From 75f980adc68487a0427505c0ccffbba2a7a77809 Mon Sep 17 00:00:00 2001 From: Kiryl Budnik Date: Tue, 14 Nov 2023 09:41:38 +0100 Subject: [PATCH] update craco configuration to disable source mapping on staging env --- craco.config.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/craco.config.js b/craco.config.js index 4398b2d0ed..5f90400839 100644 --- a/craco.config.js +++ b/craco.config.js @@ -25,10 +25,9 @@ module.exports = { { plugin: { overrideWebpackConfig: ({ webpackConfig }) => { - webpackConfig.devtool = - process.env.REACT_APP_ENV === "dev" - ? "source-map" - : "eval-cheap-module-source-map"; + if (process.env.REACT_APP_ENV === "stage") { + delete webpackConfig.devtool; + } return webpackConfig; },