Visual Studio 2015 Cordova Ionic 2 does not update assembly html files

I am running Visual Studio 2015 with Apache Cordova and Ionic 2.

If I update any of the files htmlor tsin app/pages, the ripple emulator application is updated (this detects updates), but the content of the application remains the same. Only when updating files www/build/pagesdoes content update.

It doesn't seem to matter how many times I build / clean / rebuild, the only way to update the contents of the application is to change the files in build, rather than app.

Any ideas? Of course, should I update app/pagesand automatically review updates distributed to, www/build/pagesor at least to the assembly?

+4
source share
2 answers

Despite cleaning the Internet and almost returning to Ionic version 1 (since the lack of build made Ionic version 2 unusable, in version 1 you edit the files directly in the folder www), it turns out that the solution was in Project_Readme.html. (Who ever reads the instructions?!; -): - D)

The problem seems to be related to Gulp, which handles assembly ( Gulpfile.js). When navigating View -> Other Windows -> Task Runner Explorer, the details of the Gulp assembly seem to open, and for some reason opening this window seems to cause the correct assembly from appto www.

+3
source

"watch" - script package.json. Ionic Visual Studio.

  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve",
    "watch": "ionic-app-scripts watch"
  },
Hide result

Project Open readme. (/ )

+2

Source: https://habr.com/ru/post/1655742/


All Articles