mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
fix: ensure builds are relative to buildDir
This commit is contained in:
parent
ef4e5443aa
commit
a9a262f258
@ -33,6 +33,9 @@ async function main () {
|
|||||||
consola.success('Using existing nuxt build from', prettyPath(config.buildDir))
|
consola.success('Using existing nuxt build from', prettyPath(config.buildDir))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure relative operations are relative to build dir (fixes rollup dynamic imports)
|
||||||
|
process.chdir(config.buildDir)
|
||||||
|
|
||||||
// Compile html template
|
// Compile html template
|
||||||
const htmlTemplateFile = resolve(config.buildDir, 'views/app.template.html') // TODO: nuxt3: document.template.html
|
const htmlTemplateFile = resolve(config.buildDir, 'views/app.template.html') // TODO: nuxt3: document.template.html
|
||||||
const htmlTemplateFileJS = htmlTemplateFile.replace(/.html$/, '.js').replace('app.', 'document.')
|
const htmlTemplateFileJS = htmlTemplateFile.replace(/.html$/, '.js').replace('app.', 'document.')
|
||||||
@ -78,7 +81,6 @@ async function main () {
|
|||||||
consola.success('Generated', prettyPath((ctx.rollupConfig.output as any).file),
|
consola.success('Generated', prettyPath((ctx.rollupConfig.output as any).file),
|
||||||
chalk.gray(`(Size: ${size} Gzip: ${zSize})`)
|
chalk.gray(`(Size: ${size} Gzip: ${zSize})`)
|
||||||
)
|
)
|
||||||
|
|
||||||
await hooks.callHook('rollup:done', ctx)
|
await hooks.callHook('rollup:done', ctx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user