capistrano-plugins / capistrano-faster-assets

Skips asset compilation if none of the assets were changed since last release.
MIT License
187 stars 38 forks source link

Ignores webpacker assets when deciding if things have changed since last release #30

Open hishammalik opened 6 years ago

hishammalik commented 6 years ago

This gem does not take into account changes to the webpacker assets and as a result the assets:precompile tasks gets incorrectly ignored.

adrianthedev commented 6 years ago

Yea, this would be a great addition with the new webpacker gem

alpracka commented 5 years ago

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')
brandoncordell commented 5 years ago

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?

alpracka commented 5 years ago

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.

soundnotation commented 4 years ago

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.

PabloC commented 3 years ago

+1

emanalkhaldiyebab commented 2 years ago

+1