Sign in

customize - CRA closes MapSource

Annie edited in Mon, 18 Jul 2022

Problem description

Using react app rewired customize CRA to configure webpack

The background of the problem and what methods have you tried

I don't know how to modify the configuration. Without eject, the MapSource file is not generated

Related codes

//Please paste the code text below (do not use pictures to replace the code) const {override, fix Babel imports, add lessloader, add webpack alias, adjust toolbox} = require ('customize CRA '); const path = require ('path'); const resolve = (DIR) = > path.join (__ dirname, dir);

module.exports = override(

fixBabelImports('import', {
    libraryName: 'antd',
    libraryDirectory: 'es',
    style: true
    javascriptEnabled: true,
    modifyVars: {'@primary-color': '#1DA57A'}
    '@': resolve('src')


What are your expectations? What is the actual error message?

No error, can close MapSource

1 Replies
commented on Tue, 19 Jul 2022

Add a sentence under config override process.env.GENERATE_ Sourcemap = false; modify environment variable

const { override, disableEsLint, fixBabelImports } = require('customize-cra');

process.env.GENERATE_SOURCEMAP = "false";
module.exports = override (
   fixBabelImports('import', {
     libraryName: 'antd',
     libraryDirectory: 'es',
     style: 'css',
lock This question has been locked and the reply function has been disabled.