Skip to content

Commit

Permalink
Add deployment note in README
Browse files Browse the repository at this point in the history
It's recommended to use `yarn install --frozen-lockfile` in a deployment
context prior to compiling assets for production. This practice may help
offset potential concerns with the removal of the yarn integrity check,
at least in production environemnts.
  • Loading branch information
rossta committed Apr 1, 2020
1 parent 4538582 commit aacd95c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -392,6 +392,8 @@ Webpacker::Compiler.watched_paths << 'bower_components'

Webpacker hooks up a new `webpacker:compile` task to `assets:precompile`, which gets run whenever you run `assets:precompile`. If you are not using Sprockets, `webpacker:compile` is automatically aliased to `assets:precompile`. Similar to sprockets both rake tasks will compile packs in production mode but will use `RAILS_ENV` to load configuration from `config/webpacker.yml` (if available).

When compiling assets for production on a remote server, such as a continuous integration environment, it's recommended to use `yarn install --frozen-lockfile` to install NPM packages on the remote host to ensure that the installed packages match the `yarn.lock` file.

## Docs

- [Development](https://github.com/rails/webpacker#development)
Expand Down

0 comments on commit aacd95c

Please sign in to comment.