From f4ceeae9476a935e9269d47da888d7a183052934 Mon Sep 17 00:00:00 2001 From: Kiryl Budnik Date: Thu, 9 Nov 2023 11:19:59 +0100 Subject: [PATCH] update the webpack devtool configuration for testing on dev env --- craco.config.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/craco.config.js b/craco.config.js index 4398b2d0ed..6bf469eb7b 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.NODE_ENV === "development") { + delete webpackConfig.devtool; + } return webpackConfig; },