bridge
bridge copied to clipboard
Nitro server build takes a long time
Environment
- Operating System:
Windows_NT
- Node Version:
v16.13.2
- Nuxt Version:
2.16.0-27616340.013f051b
- Package Manager:
[email protected]
- Builder:
webpack
- User Config:
buildModules
,serverHandlers
,devServerHandlers
,bridge
- Runtime Modules:
-
- Build Modules:
()
,@nuxtjs/[email protected]
,@nuxt/[email protected]
Reproduction
https://github.com/warflash/nuxt-bridge-server-build
Describe the bug
In my case adding vuetify makes the build time using nuxi build
go from a few seconds to ~10 minutes.
Setting bridge.nitro: false
makes the build go through as fast as one would expect.
Possibly related discussions: https://github.com/nuxt/bridge/discussions/394; https://github.com/nuxt/bridge/discussions/379
Discord: https://discord.com/channels/473401852243869706/992155295927251074/997164491689181275
Additional context
No response
Logs
No response
Would you try setting nitro.autoImport.exclude? https://github.com/nuxt/framework/pull/5981
I experience the same issue and have added
nitro: {
autoImport: {
exclude:
'[/[\\/]node_modules[\\/]/, /[\\/].git[\\/]/, /[\\/].nuxt[\\/]/]',
},
},
to nuxt.config.ts
.
That did not solve the issue for me. Maybe I did something wrong?
Try this?
nitro: {
autoImport: {
exclude: [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
},
},
Indeed! Added quotes by mistake. Now the build time for my project is reduced from 9 minutes back to 2.5 minutes :tada:
Closing as this has been fixed upstream in nitro💚(kinda forgot about it)