From 5aa31613bd5384a6061b8eae84a38640ef036ad8 Mon Sep 17 00:00:00 2001 From: "Xin Du (Clark)" Date: Sun, 24 Jan 2021 21:12:07 +0000 Subject: [PATCH] fix(config): always disasble server sourceMap (#88) --- packages/nitro/src/compat.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/nitro/src/compat.ts b/packages/nitro/src/compat.ts index d8c6ffdc58..5f690e36d4 100644 --- a/packages/nitro/src/compat.ts +++ b/packages/nitro/src/compat.ts @@ -39,12 +39,10 @@ export default function nuxt2CompatModule () { } // Disable server sourceMap, esbuild will generate for it. - if (nitroContext.sourceMap !== false) { - nuxt.hook('webpack:config', (webpackConfigs) => { - const serverConfig = webpackConfigs[2] || webpackConfigs[2] - serverConfig.devtool = false - }) - } + nuxt.hook('webpack:config', (webpackConfigs) => { + const serverConfig = webpackConfigs[2] || webpackConfigs[2] + serverConfig.devtool = false + }) // Nitro client plugin this.addPlugin({