dilanx / craco

Create React App Configuration Override, an easy and comprehensible configuration layer for Create React App.
https://craco.js.org
Apache License 2.0
7.43k stars 499 forks source link

Remove .map files from build folder #439

Closed ashotosipyan closed 2 years ago

ashotosipyan commented 2 years ago

Hi,

I'm trying to get rid of the map files after craco build command, but unfortunately nothing worked for me, maybe there is a config for this? I can't find anything in docs, thank you!

dilanx commented 2 years ago

Setting up your craco config like below should do the trick.

/* craco.config.js */

module.exports = {
  webpack: {
    configure: (webpackConfig) => {
      delete webpackConfig.devtool;
      return webpackConfig;
    }
  }
}
ashotosipyan commented 2 years ago

Thank you @dilanx, that's worked!