Skip to content

Commit

Permalink
update webpack configuration with devtool property
Browse files Browse the repository at this point in the history
  • Loading branch information
budnik9 committed Nov 7, 2023
1 parent 3495fc3 commit 7914ee8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,17 @@ module.exports = {
tsConfigPath: "./tsconfig.paths.json",
},
},
{
plugin: {
overrideWebpackConfig: ({ webpackConfig }) => {
webpackConfig.devtool =
process.env.REACT_APP_ENV === "dev"
? "source-map"
: "eval-cheap-module-source-map";

return webpackConfig;
},
},
},
],
};

0 comments on commit 7914ee8

Please sign in to comment.