npm run build -- --watch

Category: Node.js & npm/yarn

npm run build -- --watch

Run the build script and pass extra flags after -- directly to the underlying tool

Runs the build script and passes '--watch' to the underlying tool (e.g. webpack) so it rebuilds automatically whenever you change a file. Everything after -- is forwarded.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.