Upgrade docs to refer to Shakapacker
justin808 opened this issue · 1 comments
justin808 commented
https://github.com/reactjs/react-rails#3-now-run-the-installers doc refers to webpacker.
Let's update this.
Assigned: @ahangarha
ahangarha commented
I worked on this issue for a couple of days. I tried different scenarios and found two issues:
- I have realized there is an issue with
config/webpacker.ymlfile generated by shakapacker. The value forsource_entry_pathis set to/which is taken as an absolute path by RubyPathnameand as a result,react-railsinstall script tries to copy files to the root of filesystem. This can be fixed either by manually replacing/with., or add some automation for overridingwebpacker.ymlfile, or fix the issue right in theshakapackerproject. I think this was a bug but never seen because no project uses/for that entry. - For react-rails we need to install
prop-typesas well. We need to add this step in installing react and related packages before runningrails g react:install.
With these two changes, I could install the project on both Rails 6 and Rails 7.