How do I build with watch enabled using angular-cli?

后端 未结 3 616
闹比i
闹比i 2020-12-14 00:57

I don\'t want to use serve, I know it watches for changes, builds and serves. I want to build upon changes. According to \"ng help\", build takes parameter --watch

3条回答
  •  有刺的猬
    2020-12-14 01:03

    I don´t know if it´s a bug or just not documented, but it seems that you need to add a output path for watching with ng build -o dist -w while dist is your output path.

    Update:

    The command is now: ng build -op dist -w

    Update 2:

    The command is now: ng build --output-path dist --watch

提交回复
热议问题