Skip to content
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

Move react dependencies to docs. #3224

Merged
merged 1 commit into from
Dec 29, 2021

Conversation

justin808
Copy link
Contributor

@justin808 justin808 commented Nov 15, 2021

This commit removes React dependencies, replacing them with docs.

Here's what changes in my example project with this change:

https://github.com/shakacode/react_on_rails_tutorial_with_ssr_and_hmr_fast_refresh/pull/21/files

I feel that if we're not going to support HMR, then it makes sense to let React configuration be outside of rails/webpacker.

@justin808
Copy link
Contributor Author

@guillaumebriday @dhh Should we remove all of React from rails/webpacker?

@justin808
Copy link
Contributor Author

@guillaumebriday this is rebased on master.

@justin808
Copy link
Contributor Author

I've got a draft NPM package that will make React with SSR and HMR a one-liner for rails/webpacker users: shakacode/react_on_rails_demo_ssr_hmr#24

Here's the config that takes the docs change and puts it into the NPM module: https://github.com/shakacode/react-on-webpacker/blob/main/babel/preset.js

Also, provide a simple example of customizing the base babel config.
@justin808 justin808 added this to the 6.0 milestone Dec 5, 2021
@guillaumebriday guillaumebriday merged commit bc6fe1b into rails:master Dec 29, 2021
@justin808 justin808 mentioned this pull request Jan 28, 2022
7 tasks
@justin808 justin808 deleted the justin808-remove-react branch April 6, 2022 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants