In my package.json
, I defined two scripts. How do I run them at the same time?
"scripts": {
"server": "webpack-dev-server",
"webpack": "webpack -wd",
},
Invoke scripts via npm run with & for parallel execution or with && for sequential execution:
npm run server & npm run webpack
Explanation:
Use && for sequential execution.
Use & for parallel execution.
"scripts": {
"sw": "webpack-dev-server & webpack -wd"
},
then
npm run sw
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With