mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix: configurable publicPath (closes #21)
This commit is contained in:
parent
2e329d0403
commit
aff2372650
@ -20,6 +20,7 @@ export interface SLSOptions {
|
||||
buildDir: string
|
||||
publicDir: string
|
||||
routerBase: string
|
||||
publicPath: string
|
||||
fullStatic: boolean
|
||||
staticAssets: any
|
||||
|
||||
@ -63,6 +64,7 @@ export function getoptions (nuxt: SLSNuxt): SLSOptions {
|
||||
buildDir: nuxt.options.buildDir,
|
||||
publicDir: nuxt.options.generate.dir,
|
||||
routerBase: nuxt.options.router.base,
|
||||
publicPath: nuxt.options.build.publicPath,
|
||||
fullStatic: nuxt.options.target === 'static' && !nuxt.options._legacyGenerate,
|
||||
staticAssets: nuxt.options.generate.staticAssets,
|
||||
|
||||
|
@ -77,6 +77,7 @@ export const getRollupConfig = (config: SLSOptions) => {
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
'typeof window': '"undefined"',
|
||||
'process.env.ROUTER_BASE': JSON.stringify(config.routerBase),
|
||||
'process.env.PUBLIC_PATH': JSON.stringify(config.publicPath),
|
||||
'process.env.NUXT_STATIC_BASE': JSON.stringify(config.staticAssets.base),
|
||||
'process.env.NUXT_STATIC_VERSION': JSON.stringify(config.staticAssets.version),
|
||||
// @ts-ignore
|
||||
|
Loading…
Reference in New Issue
Block a user