Vite errors out from node_modules

I am trying build using vite. How can I make it not error out on packages out of my control?

import {defineConfig, transformWithEsbuild} from 'vite';
import react from '@vitejs/plugin-react-swc';
import path from 'path';
import { createHtmlPlugin } from 'vite-plugin-html';
import baseViteConfig from "./base.config";

const serverUrl = "http://dev.pontiac.internal:1070/";

export default defineConfig({
    ...baseViteConfig,
    mode: 'development',
    root: path.resolve(__dirname, '../src'),
    build: {
        outDir: path.resolve(__dirname, '../dist'),
        rollupOptions: {
            input: {
                main: path.resolve(__dirname, '../src/index.html')
            },
            output: {
                entryFileNames: 'client.min.js'
            }
        }
    },
    plugins: [
        react(),
        createHtmlPlugin({
            inject: {
                data: {
                    serverUrl: serverUrl
                }
            },
            minify: false,
            template: '../src/maintenance.html',
            filename: '../dist/maintenance.html'
        })
    ],
    server: {
        open: true,
        hot: true,
        watch: {
            usePolling: true
        }
    },
    esbuild: {
        loader: "tsx", // OR "jsx"
        include: [
            // Add this for business-as-usual behaviour for .jsx and .tsx files
            "src/**/*.jsx",
            "src/**/*.tsx",

            // Add these lines to allow all .js files to contain JSX
            "src/**/*.js",

            // Add these lines to allow all .ts files to contain JSX
            "src/**/*.ts",
        ],
    },
});

errors

[TypeScript] Found 0 errors. Watching for file changes.
✘ [ERROR] Unterminated string literal

    node_modules/react-multiselect-checkboxes/lib/DropdownButton.jsx:33:2:
      33 │ ',
         ╵   ^

✘ [ERROR] Expected ";" but found "CheckboxOption"

    node_modules/react-multiselect-checkboxes/lib/CheckboxOption.jsx:41:1:
      41 │ }CheckboxOption.defaultProps = {
         │  ~~~~~~~~~~~~~~
         ╵  ;

✘ [ERROR] Unterminated regular expression

    node_modules/react-multiselect-checkboxes/lib/Dropdown.jsx:10:74:
      10 │       {isOpen ? <Menu rightAligned={rightAligned>{children}</Menu> : null}
         ╵                                                                           ^

✘ [ERROR] The symbol "getOptionValue" has already been declared

    node_modules/react-multiselect-checkboxes/lib/CheckboxGroup.jsx:20:8:
      20 │   const getOptionValue = props.selectProps.getOptionValue;
         ╵         ~~~~~~~~~~~~~~

  The symbol "getOptionValue" was originally declared here:

    node_modules/react-multiselect-checkboxes/lib/CheckboxGroup.jsx:7:8:
      7 │   const {
        ╵         ^

I understand these are actual errors, but I can’t remove them. Webpack built it with no issue