Open hishammalik opened 6 years ago
Yea, this would be a great addition with the new webpacker gem
Edit deploy.rb
and include "app/javascript"
to asset_dependencies, e.g.:
set :assets_dependencies, %w(app/javascript app/assets lib/assets vendor/assets Gemfile.lock config/routes.rb node_modules)
and add "public/packs"
to linked dirs:
set :linked_dirs, fetch(:linked_dirs, []).push('public/packs')
set :assets_dependencies, %w(app/javascript app/assets lib/assets vendor/assets Gemfile.lock config/routes.rb node_modules)
Everything under node_modules is showing different on every deploy so it's kicking off the compilation of my webpacker stuff even when nothing changes.
Any idea why it's happening or how to get around it?
Try to add node_modules
folder to linked dirs:
set :linked_dirs, fetch(:linked_dirs, []).push('node_modules')
or try to add node_modules
folder to your repository (in case of Git - you might have node_modules
written in .gitignore
filte.
I also have the same problem. Adding public/packs to linked_dirs didn't work, nor does node_modules. Plus, committing node_modules to Git is a very bad idea.
+1
+1
This gem does not take into account changes to the webpacker assets and as a result the assets:precompile tasks gets incorrectly ignored.