redwoodjs / redwood

The App Framework for Startups
https://redwoodjs.com
MIT License
17.36k stars 1k forks source link

Support Passing Node Options #5448

Open MichaelrMentele opened 2 years ago

MichaelrMentele commented 2 years ago

I was trying to run the profiler for jest tests and build times but could not find a way to pass down the proper flags to the node runtime through the CLI.

See these threads:

jtoar commented 2 years ago

We had an issue for this that was opened a while ago that I closed after we added the launch.json config: https://github.com/redwoodjs/redwood/issues/936. But we're happy to consider this again—I'll be looking at the CLI soon so I'll see what I can do.

jtoar commented 2 years ago

@MichaelrMentele I came across this section in the webpack docs while debugging another issue and thought of this one: https://webpack.js.org/api/cli/#pass-cli-arguments-to-nodejs. It should work the same for redwood apps:

NODE_OPTIONS="..." yarn rw ...
MichaelrMentele commented 1 year ago

@jtoar huh I could have sworn I tried that but let me sanity check