Error in production when building with vite 2.9
See original GitHub issueFirst and foremost, thank you for this package. It has helped me easily manage the state of Popup components in a project that I am working on!
Unfortunately, I am experiencing a bug in my production environment that is similar to issue #88. The issue does not occur in my dev environment. However, in my production environment which utilizes the vite build
script, I am receiving the following error:
Uncaught TypeError: te.usePopupState is not a function
This is the import statement that I am using:
import { usePopupState } from "material-ui-popup-state/hooks";
Would greatly appreciate it if someone could help me resolve this issue. Thanks!
I am using: react: 18.2.0 Vite: 2.9.9 material-ui-popup-state: 4.0.1 @mui/material: 5.3.0
Issue Analytics
- State:
- Created a year ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Building for Production - Vite
When it is time to deploy your app for production, simply run the vite build command. ... From Vite 2.9, manualChunks is no...
Read more >Production build generates broken application #8777 - GitHub
Describe the bug When running the provided application in dev mode, it works as expected. However, when built for production and launched, ...
Read more >Vite production build fails (React) - Stack Overflow
I have a web app created with create-react-app that I am trying to migrate to vite, but it is not working when I...
Read more >Get Started with ActiveReportsJS Report Viewer in Vite.js(React)
Run and test the application ... If the command fails with the error that says that 'vite' is not recognized as an internal...
Read more >Error in production mode using Vite VueJS - Web - VTK
The project is built with Vuejs Vite tools. When I test the app running yarn dev the volume is rendered correctly, but as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @ssh000 I’m going to try
rollupOptions.output.manualChunks
option you mentioned, currently what I was doing as a workaround, was importing whole material-ui-popup-state and just spreading it in the file@jedwards1211 I am facing same issue, with Vite 3.1.3. Also tried plugins: [splitVendorChunkPlugin()]