Skip to content
Discussion options

You must be logged in to vote

What did you do to resolve this 😅 ?

I found out when I removed noExternals: true flag a development build thrown another error which I was able to reproduce using vite-plugin-cjs-interop although then I couldn't even build for production so I tried several combinations of vite config and ended up with following vite.config.ts:

import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { cjsInterop } from 'vite-plugin-cjs-interop';

export default defineConfig({
    ssr: {
        noExternal: process.env.NODE_ENV === 'production' ? true : []
    },
    plugins: [
        remix(),
        tsconfigPaths(),

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Gougerik
Comment options

Answer selected by Gougerik
@LocatedInSpace
Comment options

@matthewlynch
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants