fix(config): always disasble server sourceMap (#88)

This commit is contained in:
Xin Du (Clark) 2021-01-24 21:12:07 +00:00 committed by GitHub
parent 1b142148eb
commit 5aa31613bd

View File

@ -39,12 +39,10 @@ export default function nuxt2CompatModule () {
} }
// Disable server sourceMap, esbuild will generate for it. // Disable server sourceMap, esbuild will generate for it.
if (nitroContext.sourceMap !== false) { nuxt.hook('webpack:config', (webpackConfigs) => {
nuxt.hook('webpack:config', (webpackConfigs) => { const serverConfig = webpackConfigs[2] || webpackConfigs[2]
const serverConfig = webpackConfigs[2] || webpackConfigs[2] serverConfig.devtool = false
serverConfig.devtool = false })
})
}
// Nitro client plugin // Nitro client plugin
this.addPlugin({ this.addPlugin({