diff --git a/craco.config.js b/craco.config.js index f4477e6d2f..1a0f6e1601 100644 --- a/craco.config.js +++ b/craco.config.js @@ -22,5 +22,16 @@ module.exports = { tsConfigPath: "./tsconfig.paths.json", }, }, + { + plugin: { + overrideWebpackConfig: ({ webpackConfig }) => { + if (process.env.REACT_APP_ENV === "production") { + delete webpackConfig.devtool; + } + + return webpackConfig; + }, + }, + }, ], };