React On Rails

How do I deploy a react_on_rails app to Hatchbox?

If you noticed your deployment crashed with a "webpack: not found" error, then you'll need to make two simple changes.
First, add the following to your `package.json` file:
1
"scripts": {
2
"postinstall": "cd client && yarn install"
3
}
Copied!
Add the following line to your app's Deploy Script just before the rake assets:precompile line.
1
rbenv exec bundle exec bin/yarn
Copied!
Save your Deploy Script and your new deploy should successfully compile your assets.
react_on_rails clobbers the default Rails assets:precompile command which means the dependencies for your app are not installed automatically anymore.
Last modified 3yr ago
Copy link