mina-deploy / mina

Blazing fast deployer and server automation tool
https://rubygems.org/gems/mina
Other
4.34k stars 491 forks source link

Support Rails 6 asset recompilation through webpacker #656

Closed the-spectator closed 2 years ago

the-spectator commented 4 years ago

In Rails 6, Webpacker is the default JavaScript compiler. This PR adds app/javascript/ to asset_dir & public/packs/ to complied_asset_path as it is the default directory used by Webpacker.

the-spectator commented 4 years ago

Hi @d4be4st, just a friendly ping. Can you please check this PR.

varunempire commented 4 years ago

@rstacruz Can you please check this PR..

m4c3 commented 3 years ago

Can you please merge this?

lovro-bikic commented 9 months ago

Reverted in https://github.com/mina-deploy/mina/pull/723, the main reason being backward compatibility.

This still doesn't prevent you from using Webpack with Mina on your project because you can adjust the variables in your project's deploy.rb the same way they have been adjusted in this PR:

# config/deploy.rb
set :compiled_asset_path, ['public/assets', 'public/packs']
set :asset_dirs, ['vendor/assets/', 'app/assets/', 'app/javascript/', 'package.json']
set :shared_dirs, fetch(:shared_dirs, []).push('log', 'tmp/cache', 'node_modules', *fetch(:compiled_asset_path))