-
-
Notifications
You must be signed in to change notification settings - Fork 638
Description
First of all thanks for what appears to be an excellent gem (we're just starting with it) which is properly documented (huge plus)!
For context: Our admin backend is an engine living in a separate subfolder. After using the install generator react_on_rails:install
I had to do several things to configure react_on_rails to use the backend
subfolder instead of RAILS_ROOT.
I must admit, I'm not 100% sure whether things wouldn't be all along smoother for react_on_rails and other gems if we were to add them to the Gemfile of the backend
subfolder instead of to the one in RAILS_ROOT. But I haven't had time to figure this out yet.
Running the install generator inside of the subfolder doesn't work for us, because then a lot of other relative paths would need to be adjusted. Currently we're running tasks, generators, etc. from RAILS_ROOT.
Here's what I had to do:
- Delete the created
app/assets/javascripts/application.js
file and move the one new line in it to the appropriate file in the backend subfolder. - Move the hello world controller and view to the backend subfolder.
- Change
output.path
inclient/webpack.config.js
to include that subfolder. - Change the assets initializer path
- Change
config.generated_assets_dir
in the react_on_rails initializer. - Move the hello world route from the routes file in RAILS_ROOT to the one in the backend subfolder.
- Change ignore path in .gitignore
- Change cleanup path in Procfile.dev
This isn't important stuff, the things that need to be changed are still reasonable, but a target option changing essentially the root directory for the generator accelerates startup and might prevent initial debugging of what's not working.