-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Configuring manualChunks for Rollup breaks a Vite SSR build #8836
Labels
Comments
In v2, Vite turns on vite/packages/vite/src/node/build.ts Line 446 in 34df307
This is fixed in v3 (#8641), so upgrading to v3 will make it work. export default defineConfig({
build: {
rollupOptions: {
output: {
inlineDynamicImports: false
},
},
}
}); |
Kingdutch
added a commit
to zth/rescript-relay-router
that referenced
this issue
Jun 29, 2022
We use the plugin to work around a bug in Vite 2 which has been fixed in Vite 3 that breaks the SSR build if the manualChunks Rollup config is used. See vitejs/vite#8836
4 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
To bundle together common dependencies (e.g.
react
andreact-dom
) that may not change often, it's common to use themanualChunks
build option for rollup. However doing so will cause the build command to error when the--ssr
flag is passed.Reproduction
https:/Kingdutch/vite-ssr-manualchunks-repro
System Info
Used Package Manager
yarn
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: