1

I am creating a simple component library and would like to have it built every time I save one of my files.

This is what my current command looks like:

"watch": "babel components/ --out-dir dist --copy-files --ignore test.js --watch"

I have also moved the --watch flag around to see if it would make a difference and so far it does not make a difference and it only runs once.

For what it's worth, I am using @babel/cli v7.8.4. Anyway how could I get it to build every time I make a change? If so, what is wrong with my command?

theJuls
  • 6,788
  • 14
  • 73
  • 160

1 Answers1

2

try follow:

"watch": "babel components --extensions .jsx --out-dir dist --copy-files --ignore test.js --watch"

Y.Peng
  • 400
  • 3
  • 5