-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I have a monorepo with the following structure
root
- package.json { "scripts": { "start": "npm run start:core --ws" }, "workspace":["./packages/*"] }
- packages
- action-bar
- package.json { "scripts": { "start:core": "webpack --watch" } }
- view-1
- package.json { "scripts": { "start:core": "webpack --watch" } }
- view-2
- package.json { "scripts": { "start:core": "webpack --watch" } }
When I run npm start, it runs only the first package.
It seems that --watch flag doesn't allow npm to run the other packages.
I removed the --watch flag and it worked fine, but it is not an option for me. I'd like to have webpack in watch mode.
The same happens when I start an Express server.
@package/[email protected] start:core
webpack --watch
webpack is watching the files…
Hash: 957d27c118caf599ee3c
Version: webpack 4.30.0
Time: 1187ms
Built at: 2021-05-22 13:55:16
Expected Behavior
I expected all the scripts run in --watch mode
Steps To Reproduce
I have a monorepo with the following structure
root
- package.json { "scripts": { "start": "npm run start:core --ws" }, "workspace":["./packages/*"] }
- packages
- action-bar
- package.json { "scripts": { "start:core": "webpack --watch" } }
- view-1
- package.json { "scripts": { "start:core": "webpack --watch" } }
- view-2
- package.json { "scripts": { "start:core": "webpack --watch" } }
When I run npm start, it runs only the first package.
It seems that --watch flag doesn't allow npm to run the other packages.
I removed the --watch flag and it worked fine, but it is not an option for me. I'd like to have webpack in watch mode.
The same happens when I start an Express server.
@package/[email protected] start:core
webpack --watch
webpack is watching the files…
Hash: 957d27c118caf599ee3c
Version: webpack 4.30.0
Time: 1187ms
Built at: 2021-05-22 13:55:16
Environment
- OS: Window 10
- Node: v12.18.3
- npm: 7.14.0