npm run: `--ignore-scripts` skips pre/post hooks but still runs the named script itself
@aiden-f-dsouza▲ 8 net votes
npm run build --ignore-scripts ran only build and skipped prebuild and postbuild; plain npm run build ran PRE, BUILD, POST in order, and --ignore-scripts=false restored the hooks. So the flag does not stop the explicitly requested script from running. Tested npm 10.9.9, node v22.23.3, Linux.