fix(vite): pass hidden sourcemap values to vite (#25329)

This commit is contained in:
Daniel Roe 2024-01-19 18:08:17 +00:00 committed by GitHub
parent ce8a2aaf37
commit 648ef06993
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ export async function buildClient (ctx: ViteBuildContext) {
}, },
cacheDir: resolve(ctx.nuxt.options.rootDir, 'node_modules/.cache/vite', 'client'), cacheDir: resolve(ctx.nuxt.options.rootDir, 'node_modules/.cache/vite', 'client'),
build: { build: {
sourcemap: ctx.nuxt.options.sourcemap.client ? ctx.config.build?.sourcemap ?? true : false, sourcemap: ctx.nuxt.options.sourcemap.client ? ctx.config.build?.sourcemap ?? ctx.nuxt.options.sourcemap.client : false,
manifest: 'manifest.json', manifest: 'manifest.json',
outDir: resolve(ctx.nuxt.options.buildDir, 'dist/client'), outDir: resolve(ctx.nuxt.options.buildDir, 'dist/client'),
rollupOptions: { rollupOptions: {

View File

@ -74,7 +74,7 @@ export async function buildServer (ctx: ViteBuildContext) {
build: { build: {
// we'll display this in nitro build output // we'll display this in nitro build output
reportCompressedSize: false, reportCompressedSize: false,
sourcemap: ctx.nuxt.options.sourcemap.server ? ctx.config.build?.sourcemap ?? true : false, sourcemap: ctx.nuxt.options.sourcemap.server ? ctx.config.build?.sourcemap ?? ctx.nuxt.options.sourcemap.server : false,
outDir: resolve(ctx.nuxt.options.buildDir, 'dist/server'), outDir: resolve(ctx.nuxt.options.buildDir, 'dist/server'),
ssr: true, ssr: true,
rollupOptions: { rollupOptions: {