fix(nitro): use app.assetsPath for publicPath (#1978)

Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
webfansplz 2021-11-29 19:31:56 +08:00 committed by GitHub
parent 00e6043601
commit 4a486377c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,7 +132,7 @@ export function getNitroContext (nuxtOptions: NuxtOptions, input: NitroInput): N
publicDir: resolve(nuxtOptions.srcDir, nuxtOptions.dir.public || nuxtOptions.dir.static),
serverDir: resolve(nuxtOptions.srcDir, (nuxtOptions.dir as any).server || 'server'),
routerBase: nuxtOptions.router.base,
publicPath: nuxtOptions.build.publicPath,
publicPath: nuxtOptions.app.assetsPath,
isStatic: nuxtOptions.target === 'static' && !nuxtOptions.dev,
fullStatic: nuxtOptions.target === 'static' && !nuxtOptions._legacyGenerate,
staticAssets: nuxtOptions.generate.staticAssets,