Skip to content

Commit

Permalink
update craco configuration to disable source mapping on staging env
Browse files Browse the repository at this point in the history
  • Loading branch information
budnik9 committed Nov 14, 2023
1 parent 5f5f58c commit 75f980a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand Down

0 comments on commit 75f980a

Please sign in to comment.