Skip to content

Commit

Permalink
update craco configuration to disable source mapping on prod
Browse files Browse the repository at this point in the history
  • Loading branch information
budnik9 committed Nov 14, 2023
1 parent a54ec9f commit 28fe5da
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
},
},
],
};

0 comments on commit 28fe5da

Please sign in to comment.