fix(vite): allow overriding vite sourcemap (#7342)

This commit is contained in:
Daniel Roe 2022-09-08 14:52:30 +01:00 committed by GitHub
parent be77d477d0
commit 2b37d72eb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ export async function buildClient (ctx: ViteBuildContext) {
dedupe: ['vue']
},
build: {
sourcemap: ctx.nuxt.options.sourcemap.client,
sourcemap: ctx.nuxt.options.sourcemap.client ? ctx.config.build?.sourcemap ?? true : false,
manifest: true,
outDir: resolve(ctx.nuxt.options.buildDir, 'dist/client'),
rollupOptions: {

View File

@ -81,7 +81,7 @@ export async function buildServer (ctx: ViteBuildContext) {
]
},
build: {
sourcemap: ctx.nuxt.options.sourcemap.server,
sourcemap: ctx.nuxt.options.sourcemap.server ? ctx.config.build?.sourcemap ?? true : false,
outDir: resolve(ctx.nuxt.options.buildDir, 'dist/server'),
ssr: ctx.nuxt.options.ssr ?? true,
rollupOptions: {