3

I was updating the scripts in package.json which uses the "./node_modules" to use NPX commands and came across ng build with "max-old-space-size" argument. I have converted the command as following from

node --max-old-space-size=10240 ./node_modules/@angular/cli/bin/ng build --prod

to

npx --max-old-space-size=10240 ng build --prod

I have two questions:

  • The npx command runs without errors, but couldn't verify if it's using the max-old-space-size argument. So, am I doing it right?
  • Is there any better way to reduce the repeated "./node_modules" in scripts?
ezcoth
  • 31
  • 3

0 Answers0