timarney / react-app-rewired

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

feat: Mock react-scripts 'config' folder #593

Closed bencergazda closed 2 years ago

bencergazda commented 2 years ago

react-scripts has a config folder that contains the base webpack or devServer configuration. Some 3rd party packages (like @storybook/preset-create-react-app) require these files, serving as a base for their own configuration.

This PR:

This makes storybook (and probably many other packages) plug and play also for the rewired apps.

timarney commented 2 years ago

Thanks @bencergazda --- I think I'll spin up a "next" release for this for testing prior to a real release.

@dawnmist outside of ensuring this is backwards compatible any other thoughts?

timarney commented 2 years ago

Just published under "next tag" if anyone can test & confirm.

Screen Shot 2022-01-26 at 5 43 13 AM
timarney commented 2 years ago

Some 3rd party packages (like @storybook/preset-create-react-app) require these files, serving as a base for their own configuration.

marged.

@bencergazda does this feel like a feature release to you or a patch

bencergazda commented 2 years ago

@timarney I'd rather say this is a feature!

timarney commented 2 years ago

Published 2.2.0

Thanks for the PRs

bencergazda commented 2 years ago

@timarney Sorry, but after the first install, I realized that we need to add /config to the files array in package.json. Otherwise npm publish strips that folder from the package. This problem didn't show up while installing the git repo. 😞

This doesn't affect the core functionality, but the mocked config folder won't be accessible until we fix this. Submitted #606 with the correction.