M-Zuber / npm-watch

run npm scripts when files change
MIT License
323 stars 38 forks source link

How can I run npm-watch in development mode? #86

Closed iec989 closed 2 years ago

iec989 commented 2 years ago

It is currently running in production mode, so I can't use the chrome extension to debug it properly.

Which parameter should I change to make it work in development mode?

My scripts looks like:

  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "dev": "vue-cli-service build --mode development",
    "lint": "vue-cli-service lint",
    "watch": "npm-watch"
  },
  "watch": {
    "build": {
      "patterns": [
        "src"
      ],
      "extensions": "js,jsx,vue,css"
    }
  },
iec989 commented 2 years ago

As simple as adding dev after npm-watch

"watch": "npm-watch dev"