mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 15:42:09 +00:00
fix(vite): externalize config at rollup, not ssr level (#2971)
This commit is contained in:
parent
33f6c3ef74
commit
b110c8c96c
@ -40,7 +40,6 @@ export async function buildServer (ctx: ViteBuildContext) {
|
||||
}
|
||||
},
|
||||
ssr: {
|
||||
external: ['#config'],
|
||||
noExternal: [
|
||||
...ctx.nuxt.options.build.transpile,
|
||||
// TODO: Use externality for production (rollup) build
|
||||
@ -63,6 +62,7 @@ export async function buildServer (ctx: ViteBuildContext) {
|
||||
preferConst: true,
|
||||
format: 'module'
|
||||
},
|
||||
external: ['#config'],
|
||||
onwarn (warning, rollupWarn) {
|
||||
if (!['UNUSED_EXTERNAL_IMPORT'].includes(warning.code)) {
|
||||
rollupWarn(warning)
|
||||
|
Loading…
Reference in New Issue
Block a user