invoke requirejs:precompile:all by rake chain directly to avoid open a new process to execute it, so it's easier to track while deploying by Capistrano
use Sprockets::Railtie.build_environment(Rails.application, true) to build Rails.application.assets when it's nil
I suggest not to include node_modules in the Sprockets assets paths in the assets.rb; otherwise, it'll compile all node_modules js file.
Use stylesheet_pack_tag to include the csss in node_modules instead.
requirejs:precompile:all
by rake chain directly to avoid open a new process to execute it, so it's easier to track while deploying by CapistranoI suggest not to include
node_modules
in the Sprockets assets paths in theassets.rb
; otherwise, it'll compile all node_modules js file. Usestylesheet_pack_tag
to include the csss in node_modules instead.