You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
Note: Now that Rails (>= 5.1) has the webpacker gem there are few reasons to use this buildpack.
The default Heroku Ruby buildpack can handle webpacker, too.
Installation
Heroku Dashboard
Add a custom buildpack to your to your application's Settings tab
under section Buildpacks by using the URL of this repository, instead
of the short name of Heroku's own buildpacks. It goes alongside your
Ruby and Node buildpacks, placed in last position.
After the release of registered buildpacks, it will be available under
the name febeling/webpack-rails, adhearing to the suggested naming
conventions there.
Heroku CLI
First, check your Heroku app has the Ruby and Node buildpacks added,
in the command line run:
On deployment, the buildpack runs the build command bundle exec rake webpack:compile. Under default configuration that will output the
compiled assets under public/webpack.
Package Manager
Heroku supports both NPM and Yarn as Javascript package managers. This
buildpack will detect which one to use automatically, based on the
persence of a version-lock file. Projects that use yarn have a
yarn.lock file, while those that use npm have a package-lock.json
(or none if using an older version of npm).
This buildpack will set the YARN environment variable accordingly, which
will make that the effective package manager for Javascript.
Using the latest buildpack code
The febeling/webpack-rails buildpack from the Heroku
Registry
contains the latest stable version of the buildpack. If you'd like to
use the latest buildpack code from this Github repository, you can set
your buildpack to the Github URL: