mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(vite): resolve #_config
in base plugin (#3848)
This commit is contained in:
parent
8bb02be218
commit
93c4dfe091
@ -40,6 +40,7 @@ export const DynamicBasePlugin = createUnplugin(function (options: DynamicBasePl
|
||||
if (id.startsWith('/__NUXT_BASE__')) {
|
||||
return id.replace('/__NUXT_BASE__', '')
|
||||
}
|
||||
if (id === '#_config') { return '#_config' }
|
||||
return null
|
||||
},
|
||||
enforce: 'post',
|
||||
|
@ -62,7 +62,6 @@ export async function buildServer (ctx: ViteBuildContext) {
|
||||
preferConst: true,
|
||||
format: 'module'
|
||||
},
|
||||
external: ['#config'],
|
||||
onwarn (warning, rollupWarn) {
|
||||
if (!['UNUSED_EXTERNAL_IMPORT'].includes(warning.code)) {
|
||||
rollupWarn(warning)
|
||||
|
@ -82,7 +82,7 @@ export async function bundle (nuxt: Nuxt) {
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
} as ViteOptions,
|
||||
nuxt.options.vite
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user