diff --git a/lib/shakapacker/dev_server_runner.rb b/lib/shakapacker/dev_server_runner.rb index 4b91cdfc..5133c2b3 100644 --- a/lib/shakapacker/dev_server_runner.rb +++ b/lib/shakapacker/dev_server_runner.rb @@ -84,7 +84,7 @@ def execute_cmd end if @argv.delete("--debug-shakapacker") || @argv.delete("--debug-webpacker") - env["NODE_OPTIONS"] = "#{ENV["NODE_OPTIONS"]} --inspect-brk --trace-warnings" + env["NODE_OPTIONS"] = "#{env["NODE_OPTIONS"]} --inspect-brk --trace-warnings" end cmd += ["--config", @webpack_config] diff --git a/lib/shakapacker/webpack_runner.rb b/lib/shakapacker/webpack_runner.rb index 4848e378..08f4fae0 100644 --- a/lib/shakapacker/webpack_runner.rb +++ b/lib/shakapacker/webpack_runner.rb @@ -37,15 +37,15 @@ def run end if @argv.delete("--debug-shakapacker") || @argv.delete("--debug-webpacker") - env["NODE_OPTIONS"] = "#{ENV["NODE_OPTIONS"]} --inspect-brk" + env["NODE_OPTIONS"] = "#{env["NODE_OPTIONS"]} --inspect-brk" end if @argv.delete "--trace-deprecation" - env["NODE_OPTIONS"] = "#{ENV["NODE_OPTIONS"]} --trace-deprecation" + env["NODE_OPTIONS"] = "#{env["NODE_OPTIONS"]} --trace-deprecation" end if @argv.delete "--no-deprecation" - env["NODE_OPTIONS"] = "#{ENV["NODE_OPTIONS"]} --no-deprecation" + env["NODE_OPTIONS"] = "#{env["NODE_OPTIONS"]} --no-deprecation" end # Webpack commands are not compatible with --config option.