fix(vite): enable css sourcemaps in dev based on sourcemap (#18446)

This commit is contained in:
Daniel Roe 2023-01-23 11:08:48 +00:00 committed by GitHub
parent 5ede291a14
commit 022c95269e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,9 @@ export async function buildClient (ctx: ViteBuildContext) {
return { runtime: `globalThis.__publicAssetsURL(${JSON.stringify(filename)})` }
}
},
css: {
devSourcemap: ctx.nuxt.options.sourcemap.client
},
define: {
'process.server': false,
'process.client': true,

View File

@ -34,6 +34,9 @@ export async function buildServer (ctx: ViteBuildContext) {
}
}
},
css: {
devSourcemap: ctx.nuxt.options.sourcemap.server
},
define: {
'process.server': true,
'process.client': false,