-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vite cjsInterop SyntaxError with MUI #9605
Comments
I have the same issue too. ReproductionRun npm run build "npm run dev" work System Info
This project was created with "npx create-remix@latest --template remix-run/remix/templates/spa". vite.config.ts
Used Package Managernpm Expected BehaviorI was expecting npm run build to finish successfully. Actual Behavior
|
I've been able to work around this issue with import { AdapterDateFns } from '@mui/x-date-pickers/node/AdapterDateFnsV3'; |
@jhartling thanks for sharing your workaround!
|
@cjoecker you should be able to ignore that error with a |
@jhartling you are right but adding |
It happens exactly the same to me, only when doing a build and SSR is false. I need this to work on SPA, else i will have to use RR and see if this doesnt happen there |
1 similar comment
It happens exactly the same to me, only when doing a build and SSR is false. I need this to work on SPA, else i will have to use RR and see if this doesnt happen there |
Reproduction
npm install
npm run build
npm run start
See the error on the console
System Info
Used Package Manager
npm
Expected Behavior
CJS libraries work with vite and
cjsInterop
.Actual Behavior
On
build start
commands, Remix is throwing the errorInterestingly, it is working fine with
npm run dev
I already tried
ssr.noExternal
on the vite config.I also tried importing the package as
The text was updated successfully, but these errors were encountered: