Watching for updates for ionic serve?

When I was using ionic v1, I have been using gulp watch to make sure my changes will be compiled into the www dir automatically.

Recently I’m trying out ionic v2 with TypeScript, and
$ ionic serve
works perfect: it seems compiling the ts files, copy the templates, and then starts the server.

However, it seems that my changes to app/**/*.html, *.ts, … wouldn’t be automatically reflected in the served page.

Is there anything else that I should do let it “watch” for my changes? (The github page mentioned gulp , but it doesn’t seem related any more)


The html, js or ts changes are detected automatically and should reload the page, the scss changes are detected and loaded to browser without the need to reload, if yours isn’t and you just started the project from a starter project, then there’s something wrong, maybe your ionic cli install or as happened to me, the amount of watches that your OS allow are taken.

If you have a legacy Ionic 2 project, try creating a new one from a starter project and compare the file structure, config files and the dependencies with your old project.

Thanks for the information. It seems that it doesn’t work when I’m using vagrant (changing the files from the host). Changing files directly within the vagrant vm works.

But gulp works just fine even if I’m changing from the vagrant host.

Not sure if it’s a webpack problem or not.

Turns out that the reason is here:

The latest webpack will probably solve the problem with a flag. But not sure how to use it with ionic serve, filed