1

I am looking for something in-line with "ionic serve" which would detect any changes I make on the source code (Source Folders/WebContent) and :

  1. Automatically Deploy
  2. Automatically Refresh my Browser

So that I need not manually perform deployment -> Right Click my Browser -> Empty cache -> Reload my browser

1 Answer 1

1

I found the magic Node module which would save a lot of time and frustration for many developers:

https://www.npmjs.com/package/reload

Automatically refresh and reload your code in your browser when your code changes. No browser plugins required.

Steps I used to set up:

  1. Install "reload" globally - "npm install reload -g" [if you don't have npm/node - search Google there are many tutorials]

  2. Place a package.json which starts server & also triggers "reload" to start watching changes on the dev folders [I will place the sample JSON by Monday]

  3. Now make some changes to the code file using any IDE (Notepad++/Atom/Eclipse etc) and save the file

  4. Simply open the browser and observe that the page which you had already open is automatically refreshing for you without any browser cache

BTW, this was not that easy to find over search engines !! - Happy Coding

Sign up to request clarification or add additional context in comments.

2 Comments

So it's better than ionic serve?! I don't understand why some people unable to reproduce caching issue.. github.com/ionic-team/ionic-app-scripts/issues/794 I got that many times even though the command appear to work correctly in console
@Shantanu this is not a replacement or better than Ionic serve.. this is equivalent of Ionic serve for a typical web project (Simple HTML/CSS/JS)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.