Skip to content

Commit

Permalink
fix: don't duplicate NODE_OPTIONS (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath authored Aug 29, 2023
1 parent 8617937 commit 4a6dd46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/shakapacker/dev_server_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions lib/shakapacker/webpack_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4a6dd46

Please sign in to comment.