react-scripts-custom-config
v3.2.0
Published
A forked version of CRA's react-scripts which support customisation of config with out ejecting
Downloads
6
Readme
react-scripts-custom-config
A forked version of CRA's
react-scripts
which support customisation of config with out ejecting.
This package includes scripts and configuration used by Create React App. Please refer to its documentation:
- Getting Started – How to create a new app.
- User Guide – How to develop apps bootstrapped with Create React App.
Quick Start
npx create-react-app <project-name> --scripts-version react-scripts-custom-config
Customising config
In your project's root create a folder archetype
. Create a config file with same name say if you want to customise Webpack config, then create a file webpack.config.js
under <root-dir>/archetype
. Add your customised config.
module.exports = (webpackEnv, defaultConfig) => {
// defaultConfig - config provided by CRA, you can mutate/override it as per you needs and pass the same
const webpackConfig = {
...
};
return webpackConfig
}
Similarly to you can customise Webpack DEV Sever config by creating a file webpackDevServer.config.js
& Jest config with jest.config.js
as shown above.