timarney / react-app-rewired

Override create-react-app webpack configs without ejecting
MIT License
9.8k stars 424 forks source link

Override webpackEnv used in CRA config #640

Open raDiesle opened 1 year ago

raDiesle commented 1 year ago

Is it possible to override the "webpackEnv" used in the original CRA config.

Background: Would be easier to just set it to env "dev" to create a faster build when "react-scripts build" script is executed and not change all configured plugins to disable minification everywhere.

with yarn we can patch files and change, which environment is being passed from react-scripts to get the config. Not sure if this goes in the right direction. https://yarnpkg.com/cli/patch