From 69c5a66a7ad31e68dff3083ec4ae9c518eec0f8f Mon Sep 17 00:00:00 2001 From: zkldi Date: Mon, 1 Nov 2021 02:04:34 +0000 Subject: [PATCH] Disable sourcemaps on build --- client/config/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/config/webpack.config.js b/client/config/webpack.config.js index 3b7c66f08..7dee13430 100644 --- a/client/config/webpack.config.js +++ b/client/config/webpack.config.js @@ -30,7 +30,7 @@ const postcssNormalize = require("postcss-normalize"); const appPackageJson = require(paths.appPackageJson); // Source maps are resource heavy and can cause out of memory issue for large source files. -const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== "false"; +const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== "false" && process.env.NODE_ENV !== "production"; // Some apps do not need the benefits of saving a web request, so not inlining the chunk // makes for a smoother build process. const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== "false";