-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Development mode transpiles correctly while build doesn't. #5759
Comments
Similarly, I have encountered the same problem. My app works perfectly in development mode but breaks in production when it is build by rollup with the following error:
This issue only appears in version 2.6.3 and up. It does not appear in version 2.6.2. |
This may be an problem of The reason for the inconsistency between dev and build is that in dev, vite uses |
+1 |
Has an issue at |
Rollup commonjs plugin set Try to set
Some libraries, including the one I use, may use |
Thanks, That actually fixed it for me 😄 |
Thanks, @FPG-Alan, it works for resolving problem with dagre package. |
I had the same issue and this flag fixed it. |
it works for dagre "Cannot read property 'Graph' of undefined" problem |
Judging from vitejs/vite#5759, this should fix the Chromatic issue we've been having with dagre, and if so, will also fix a problem we *would* have had with a production build of our own app once we tried to render React Flow trees.
Judging from vitejs/vite#5759, this should fix the Chromatic issue we've been having with dagre, and if so, will also fix a problem we *would* have had with a production build of our own app once we tried to render React Flow trees.
Judging from vitejs/vite#5759, this should fix the Chromatic issue we've been having with dagre, and if so, will also fix a problem we *would* have had with a production build of our own app once we tried to render React Flow trees.
This commit fixes the Chromatic issue we've been having with dagre. It also preemptively applies the same workaround to the `primer-app` package, as it's likely we'd have had the same issue for production builds of the app. For details, see: vitejs/vite#5759
This commit fixes the Chromatic issue we've been having with dagre. It also preemptively applies the same workaround to the `primer-app` package, as it's likely we'd have had the same issue for production builds of the app. For details, see: vitejs/vite#5759
Vite 3 now uses esbuild for builds, and I can confirm the repro works now with Vite 3.0.0-beta.2 |
Describe the bug
I am using the following dependency: https://github.com/bitcoinjs/bip39
This loads bip39 and works perfectly when running yarn dev(I did have to use some work arounds to get it running), when building it breaks.
I'd like to understand why this works under development but not when I build the entire project. It seems to be related to commonjs because bip39 uses require. This is perfectly transpiled when using development but breaks when build.
Reproduction
Miminal reproduction: https://github.com/jimbertools/vite-bip39
This loads bip39 and works perfectly when running yarn dev(I did have to use some work arounds to get it running), when building it breaks.
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: