About create-react-app webapck profile Modification

after successful installation, there is a file with the file name config-overrides.js,

/ * *
* @ do stuff with the webpack config.
* /
module.exports = function override (config, env) {

//
   config = injectBabelPlugin(
     [
         "import", 
         { 
             libraryName: "antd", 
             libraryDirectory: "es", 
             style: "css" 
         }
     ],
     config,
);


return config;

};

how can I add or modify configuration information here? Try to modify it, but the final result is unsuccessful.


to modify the webpack configuration of create-react-app, you need to first

    npm run eject

decompile, and then you can see the original configuration file.


can not be said to be full of holes, the starting point is different, the purpose of scaffolding itself is to provide a general-purpose build solution. As far as I understand it, the starting point of using create-react-rewired is to cater to the development habits of developers or teams, such as customizing the configuration of babel, eslint or css preprocessors, and generally providing configuration item parameters. For custom webpack itself, it is better to eject and change it slowly.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be58a2-317a3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be58a2-317a3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?