You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vite: {build: {rollupOptions: {output: {inlineDynamicImports: false,// <-- I get manualChunks, but not all the ones I specify manualChunks: {utils: ['./lib/utils.js']// example. utils will correctly be created in .nuxt/dist/server/chunks, but never transferred to .output/server/chunks}}}},}
Describe the bug
When attempting to build Nuxt application which may work perfectly fine in development mode (nuxi dev), actually building the application using nuxi build will finally see and warn about chunk sizes being too large. This is the typical warning message that appears:
(!) Some chunks are larger than 500 KiB after minification. Consider:
Using dynamic import() to code-split the application
Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
I have tried to use dynamic imports as much as possible, but this is not always ideal because then it requires so much code refactoring and lose the benefit of top-level imports. I'd also prefer not to increase the chunk size warning limit since the warning should probably not be ignored. So, I try specify manualChunks only to encounter the following error message:
Invalid value for option "output.manualChunks" - this option is not supported for "output.inlineDynamicImports".
It seems like I can't specify those options. It would be nice if I could.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
@richardeschloss Seems to not work for server build at the moment. But just using a hook like this works at least for building the client dependencies.
Environment
Linux
v16.13.1
2.16.0-27347055.777a4b7f
[email protected]
Webpack
components
,bridge
,vite
,css
,target
,head
,plugins
,buildModules
,stories
,telemetry
-
@nuxt/[email protected]
Reproduction
Attempt to specify
manualChunks
in nuxt.config:Describe the bug
When attempting to build Nuxt application which may work perfectly fine in development mode (nuxi dev), actually building the application using nuxi build will finally see and warn about chunk sizes being too large. This is the typical warning message that appears:
I have tried to use dynamic imports as much as possible, but this is not always ideal because then it requires so much code refactoring and lose the benefit of top-level imports. I'd also prefer not to increase the chunk size warning limit since the warning should probably not be ignored. So, I try specify
manualChunks
only to encounter the following error message:It seems like I can't specify those options. It would be nice if I could.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: