facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.75k stars 26.86k forks source link

Plugin System #670

Closed gaearon closed 6 years ago

gaearon commented 8 years ago

I know we said we don’t offer any configuration but...

If Create React App had a plugin system, what would it be like? Can you briefly describe build tooling plugin systems that you’ve used and liked in this thread?

If it was supported, what would you build with it?

thtliife commented 7 years ago

Oh also... @gaearon In response to the original question

If Create React App had a plugin system, what would it be like?

Check out my take on a plugin system for create-react-app based on the 0.9.x branch as per your comment https://github.com/facebookincubator/create-react-app/pull/779#issuecomment-284509789

We care about experience of forkers, and if there's more things we should fix, please file issues. The only gotcha right now is that we're releasing from 0.9.x branch since Webpack integration in master still has issues. So we recommend releasing based on 0.9.x as well.

react-scripts-pluggable Github link (It is the react-scripts-pluggable branch of the fork).

sheerun commented 7 years ago

Neutrino has concept of presets that are simple node.js modules implementing function transforming its configuration. Notably it allows for configuring webpack configuration by modifying neutrino.config that is an instance of webpack-chain

I wish create-react-app adapted similar approach :)

gaearon commented 7 years ago

Wrote up a little tweetstorm here if you're interested: https://twitter.com/dan_abramov/status/855843921385201664

I agree about Neutrino's approach being nice (you can use one preset at a time, right?)

davidnguyen11 commented 7 years ago

You might want to take a look at next.js public webpack config. I think it is a great way.

gaearon commented 6 years ago

There are no plans to do this right now. If you're interested in more flexibility, check out Neutrino.