mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 17:07:22 +00:00
fix(nuxt3): avoid #_config
app import in dev mode (#3896)
This commit is contained in:
parent
e72e6d0d0f
commit
dc1064f79a
@ -179,7 +179,7 @@ export const publicPathTemplate: NuxtTemplate = {
|
||||
getContents ({ nuxt }) {
|
||||
return [
|
||||
'import { joinURL } from \'ufo\'',
|
||||
'import config from \'#_config\'',
|
||||
!nuxt.options.dev && 'import config from \'#_config\'',
|
||||
|
||||
nuxt.options.dev
|
||||
? `const appConfig = ${JSON.stringify(nuxt.options.app)}`
|
||||
@ -194,6 +194,6 @@ export const publicPathTemplate: NuxtTemplate = {
|
||||
' const publicBase = appConfig.cdnURL || appConfig.baseURL',
|
||||
' return path.length ? joinURL(publicBase, ...path) : publicBase',
|
||||
'}'
|
||||
].join('\n')
|
||||
].filter(Boolean).join('\n')
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user