mirror of
https://github.com/zhigang1992/react.git
synced 2026-01-24 20:57:51 +08:00
Tree shaking for create react app
This is example of tree-shaking for create-react-app.
By default, we do not eject configs from create-react-app, in this example,
we use react-app-rewired to change the default configs.
About
- Add
config-overrides.jsto your root folder. - Add deps:
yarn add babel-plugin-import customize-cra react-app-rewired -D - Replace your default scripts(
react-scripts) withreact-app-rewired.
Previews
Before:
After:

