react_on_rails
react_on_rails copied to clipboard
bin/webpacker is running twice during assets:precompile if
This change is broken:
https://github.com/shakacode/react_on_rails/commit/9637c09e46372f92d09113a2eb61b3658b47b351#diff-ee77363403f2346e5588ba25b2ef77d2b8e70d3c699fec17edf68fa3dd3b6766R127
Repro:
- Set react_on_rails.rb to have
config.build_production_command = "yarn start build.prod"
- Run
RAILS_ENV=production NODE_ENV=production rake assets:precompile
.bin/webpacker
will run twice.
Workaround
WEBPACKER_PRECOMPILE=false bin/rake RAILS_ENV=production NODE_ENV=production assets:precompile
@justin808 In other words, there is no way to add ENV["WEBPACKER_PRECOMPILE"] = "false"
conditional on the presence of config.build_production_command