Skip to content
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

Production Build Error using ViteJS #14

Closed
henchicky opened this issue Nov 24, 2021 · 1 comment
Closed

Production Build Error using ViteJS #14

henchicky opened this issue Nov 24, 2021 · 1 comment

Comments

@henchicky
Copy link

henchicky commented Nov 24, 2021

I am using ViteJS, which using Rollup for production build. (instead of create-react-app - Webpack)

Works well in development, I absolutely love it.
However, when building for production, and running in localhost, browser console shows this

Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=object&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

Any help is appreciated, not sure if it is due to Rollup giving this error??

Below is my code,
code

2021-11-25 03_43_48-Business Portal - Brave

@henchicky
Copy link
Author

henchicky commented Nov 25, 2021

react-switch having issues with rollup.
I changed import statement from
import Switch from 'react-switch';
to
import Switch from 'react-switch/dist/react-switch.dev.js';

Solved!
vitejs/vite#2139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant