mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05:11 +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: {
|
ssr: {
|
||||||
external: ['#config'],
|
|
||||||
noExternal: [
|
noExternal: [
|
||||||
...ctx.nuxt.options.build.transpile,
|
...ctx.nuxt.options.build.transpile,
|
||||||
// TODO: Use externality for production (rollup) build
|
// TODO: Use externality for production (rollup) build
|
||||||
@ -63,6 +62,7 @@ export async function buildServer (ctx: ViteBuildContext) {
|
|||||||
preferConst: true,
|
preferConst: true,
|
||||||
format: 'module'
|
format: 'module'
|
||||||
},
|
},
|
||||||
|
external: ['#config'],
|
||||||
onwarn (warning, rollupWarn) {
|
onwarn (warning, rollupWarn) {
|
||||||
if (!['UNUSED_EXTERNAL_IMPORT'].includes(warning.code)) {
|
if (!['UNUSED_EXTERNAL_IMPORT'].includes(warning.code)) {
|
||||||
rollupWarn(warning)
|
rollupWarn(warning)
|
||||||
|
Loading…
Reference in New Issue
Block a user