-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--optimize_for_size flag doesn't work with NODE_OPTIONS env (windows 10) #35440
Comments
My fault, this option is not allowed for So another question - why does |
In a similar vein, why is |
Btw, that is not only a windows 10 problem like the subject may imply, same does apply e.g. to linux environments. I would really tune those node_options to meet my CI requirements - resources have to be shared there. The docs also has this https://nodejs.org/api/cli.html#useful-v8-options:
So any option will be passed according to the docs - but this is obviously not the case. |
Hi @crutch12, as you updated the issue description, |
What steps will reproduce the bug?
Run
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
It has to work just like this:
What do you see instead?
$ cross-env NODE_OPTIONS='--optimize_for_size' node
Error:
Additional information
Another flags work correctly, for example:
$ cross-env NODE_OPTIONS='--preserve-symlinks --max_old_space_size=4096' node
I've checked source code and found out that
--optimize_for_size
flag is not added (usingAddOption
function) innode_options.cc
file:node/src/node_options.cc
Line 546 in 22c52aa
UPD:
This option is not allowed for
NODE_OPTIONS
env: https://nodejs.org/api/cli.html#cli_node_options_optionsThe text was updated successfully, but these errors were encountered: