-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not issue. Just some thought about CRA. #3190
Comments
Some of this might be affected by the plugin system currently in progress, though I don't think we've been given any idea when that will be done. |
I think people misunderstand create-react-app purpose. // EDIT
Despite it might be a small change, think outside of the box. There are a lot of developers who really want a couple of small features being shipped into CRA. It's simply impossible. You can not build an ideal software that will fit everyones needs. |
Thanks for reply.
Yes I agree. But nowadays the react-scripts are bundled with webpack and jest configuration, it is not just configurations but also some scripts that we would like to enjoy. I think it is quite hard nowadays to create another react-scripts without forking the whole create-react-app repository. How about if having a tool that can be helpful to create another react-scripts easily with our customized configuration? Just a thought. |
You can make an eject, configure application in the way you need. |
I'll close this as it's 3 requests in one, and we already have issues tracking all of these proposals. Unfortunately, I don't think we'll ever be a one-size-fits all tool. Thanks again! |
For people who interested, I created a library called 'create-react-scripts'. |
Is this a bug report?
No
I love create-react-app and I am using it in the company projects.
But usually the choice of create-react-app cannot fulfill all our requirements.
As we all know, eject is not a good option.
Yes, I can fork the create-react-app and customize the react-scripts. But I have to maintain the fork and keep track of all the updates.
Someone ended up using react-app-rewired. It allows us to change the default configuration provided by creact-react-app with limited scope. But the overrides config have to be along with my web application project. It is not good to share the same build tools with teammate who might also working on react web project.
I believe that the default configuration provided by create-react-app is a good reference. But I also believe there are no perfect configuration unless the user create their own.
What I wonder is "Is it possible to provide a tool that let user extends the react-scripts to create their own react-scripts (Not tweak along with their react project) ?".
Let say, I just need to create a bin folder, and require the tool, then I can obtain the webpack and jest configuration that create-react-app provided, then I can do something to tweak the configuration. Publish it and use at my own risk.
Here are some features I would like to have but missing in create-react-app.
Server side rendering, I think ssr is very important especially the product is in china market, the search engine is not google, javascript is not understandable to those search engine. Pre-render is just a workaround but not good solution. Here what I did is to tweak the webpack config with same manner of react-app-rewired (change the target to 'node' and libraryTarget to 'commonjs2').
PWA, the default option of create-react-app is using 'Cache-first' policy. But 90% of times we want 'Network-first' to make user get the latest update. 'Cache-first' policy also have problem that the 'index.html' is being cached. Here what I did is to create separate script which call the 'workbox-cli' to generate the service worker.
GraphQL, now the .graphql or .gql extensions are not understandable to create-react-app. Here what I did is to tweak the webpack and jest config with same manner of react-app-rewired (add graphql-tag/loader, and add jest-transform-graphql).
As you can see, I only need small modification to achieve my purpose...
The text was updated successfully, but these errors were encountered: