mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 01:15:58 +00:00
fix(bridge): set app.basePath
(#2808)
This commit is contained in:
parent
c1a68012ca
commit
6abf75d40a
@ -18,6 +18,7 @@ export function setupNitroBridge () {
|
|||||||
// Handle legacy property name `assetsPath`
|
// Handle legacy property name `assetsPath`
|
||||||
nuxt.options.app.buildAssetsDir = nuxt.options.app.buildAssetsDir || nuxt.options.app.assetsPath
|
nuxt.options.app.buildAssetsDir = nuxt.options.app.buildAssetsDir || nuxt.options.app.assetsPath
|
||||||
nuxt.options.app.assetsPath = nuxt.options.app.buildAssetsDir
|
nuxt.options.app.assetsPath = nuxt.options.app.buildAssetsDir
|
||||||
|
nuxt.options.app.baseURL = (nuxt.options.app as any).basePath
|
||||||
// Nitro expects app config on `config.app` rather than `config._app`
|
// Nitro expects app config on `config.app` rather than `config._app`
|
||||||
nuxt.options.publicRuntimeConfig.app = nuxt.options.publicRuntimeConfig.app || {}
|
nuxt.options.publicRuntimeConfig.app = nuxt.options.publicRuntimeConfig.app || {}
|
||||||
Object.assign(nuxt.options.publicRuntimeConfig.app, nuxt.options.publicRuntimeConfig._app)
|
Object.assign(nuxt.options.publicRuntimeConfig.app, nuxt.options.publicRuntimeConfig._app)
|
||||||
|
@ -140,7 +140,7 @@ export function getNitroContext (nuxtOptions: NuxtOptions, input: NitroInput): N
|
|||||||
generateDir: nuxtOptions.generate.dir,
|
generateDir: nuxtOptions.generate.dir,
|
||||||
publicDir: resolve(nuxtOptions.srcDir, nuxtOptions.dir.public || nuxtOptions.dir.static),
|
publicDir: resolve(nuxtOptions.srcDir, nuxtOptions.dir.public || nuxtOptions.dir.static),
|
||||||
serverDir: resolve(nuxtOptions.srcDir, (nuxtOptions.dir as any).server || 'server'),
|
serverDir: resolve(nuxtOptions.srcDir, (nuxtOptions.dir as any).server || 'server'),
|
||||||
baseURL: nuxtOptions.app.baseURL,
|
baseURL: nuxtOptions.app.baseURL || '/',
|
||||||
buildAssetsDir: nuxtOptions.app.buildAssetsDir,
|
buildAssetsDir: nuxtOptions.app.buildAssetsDir,
|
||||||
isStatic: nuxtOptions.target === 'static' && !nuxtOptions.dev,
|
isStatic: nuxtOptions.target === 'static' && !nuxtOptions.dev,
|
||||||
fullStatic: nuxtOptions.target === 'static' && !nuxtOptions._legacyGenerate,
|
fullStatic: nuxtOptions.target === 'static' && !nuxtOptions._legacyGenerate,
|
||||||
|
Loading…
Reference in New Issue
Block a user