From aacd95c5b7f9dfda1492d28f536a2b34da94336c Mon Sep 17 00:00:00 2001 From: Ross Kaffenberger Date: Tue, 31 Mar 2020 21:35:27 -0400 Subject: [PATCH] Add deployment note in README 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. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2bac3a2c7..4df5ce51d 100644 --- a/README.md +++ b/README.md @@ -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)