CRACO Config Flex Plugin
CRACO is an easy and comprehensible configuration layer for create-react-app. It allows you to configure things like eslint, babel, and webpack, without using eject.
Installation
craco-config-flex-plugin
dependency is automatically added to your package.json
when you create a new plugin with create-flex-plugin.
Usage
To add custom jest
or webpack
configuration, you can provide jest.config.js
and webpack.config.js
. If these files exist in the root directory, then your configuration is merged into the default configuration; e.g. merge(defaultConfig, yourConfig)
.
For more control over the configuration, you can edit the craco.config.js
. You will need to use craco.config.js
if you need to append changes to the configuration, as opposed to replacing a key completely. For example, to append a new webpack plugin, use config.plugins.push(newPlugin)
within your craco.config.js
file. Please visit craco documentation for more information.
Contributing
Make sure to follow the instructions in the main repository to set up the project.
cd packages/craco-config-flex-plugin
npx lerna bootstrap
npm test
npm link
npm link craco-config-flex-plugin
Contributors
Thank you to all the lovely contributors to this project. Please check the main repository to see all contributors.
License
MIT