Manual Installation Overview
TODO: Review this file
This file summarizes what the React on Rails generator does.
This directory has no references to Rails outside of the destination directory for the files created by the various Webpack config files.
The only requirements within this directory for basic React on Rails integration are:
- Your webpack configuration files:
- Create outputs in a directory like
/public/webpack, which is customizable in your
- Provide server rendering if you wish to use that feature.
- Set your registration file as an "entry" point in your Webpack configs.
- Add the Manifest plugin to your config. For examples see dummy config.
The default path:
public/webpack can be loaded with webpackConfigLoader as shown in the dummy example.
- You create scripts in
client/package.json per the example apps. These are used for building your Webpack assets. Also do this for your top level
Rails Steps (outside of /client)
gem "webpacker" to the Gemfile, run bundle. The gem provides the
- Configure the
config/initializers/react_on_rails.rb. You can adjust some necessary settings and defaults. See file spec/dummy/config/initializers/react_on_rails.rb for a detailed example of configuration, including comments on the different values to configure.
- Configure your Procfiles per the example apps. These are at the root of your Rails installation.
application.js file to include your Webpack generated files.
- If you are deploying to Heroku, see heroku-deployment.md
If I missed anything, please submit a PR or file an issue.