Heroku may not detect a correct buildpack for your JS dependencies, then you have to set it manually:
heroku buildpacks:add heroku/nodejs -i 1
heroku buildpacks:add --index 2 https://github.com/heroku/heroku-buildpack-ruby
Execute line-by-line (don't cut&paste the whole block!) and then try git push heroku master
again.
Run webpack-dev-server
in a separate tab next to rails s
If the webpack-dev-server
refuses to run, you might want to downgrade it, run yarn upgrade -D webpack-dev-server@^2.11.1
.
If it insists on installing a webpack-cli
— do as the prompt tells you.
There's been an API change for Webpacker environment setup (to add jQuery as a global dependency, for instance).
Change the line environment.plugins.set
to environment.plugins.prepend
while keeping the rest intact