angular watch 'ng build -op dist -w' causes issue with watch failing to build post any minimal change

18 views
Skip to first unread message

kart...@gmail.com

unread,
Jul 25, 2017, 12:28:42 PM7/25/17
to Angular and AngularJS discussion
Hi,

I am looking to setup the dist folder as an asset bundle for my dropwizard application as ng bulid would generate the files under dist folder.

I am given to understand that 'ng build -op dist -w' would create a watch on the dist folder but I see that it constantly generates errors even if I just move a commented line by one row and change nothing else.
Is this the correct way to start angular cli watch and also is this a known issue?

Thanks

Sander Elias

unread,
Jul 25, 2017, 10:08:46 PM7/25/17
to Angular and AngularJS discussion
Hi Kartech11,,

You don't need the `-op dist` part, as that is the default anyway. The `-w` flag puts the cli in watch mode, which is what you want. If there are error's that means that there are still error's in your code, that you need to fix. Committing any change to disk, will indeed trigger a rebuild. This is not an issue, this is how it is supposed to work ;) 
BTW, you are not watching the 'dist' folder. the watch is on the src folder (or everything outside dist, not sure how it is setup internaly. tbh, I don't really care)

Regards
Sander
Reply all
Reply to author
Forward
0 new messages