This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was archived by the owner on May 1, 2020. It is now read-only.
Can't watch for changes of src/index.html
#93
Closed
Description
Short description of the problem:
When source code is watched, you can edit sass files, ts files, html templates but not index.html. It will not be detected by the watcher and thus not trigger a livereload event.
What behavior are you expecting?
Everything inside src
should be editable and "livereloadable".
Steps to reproduce:
- ionic serve
- Edit index.html inside src folder
Tried to add a watch.config.js
file inside my project referenced inside package.json
by the config property ionic_watch
, did not work:
./package.json
"config":{
"ionic_sass": "./config/sass.config.js",
"ionic_watch": "./config/watch.config.js"
},
./config/watch.config.js
var buildUpdate = require('@ionic/app-scripts/dist/build').buildUpdate;
var templateUpdate = require('@ionic/app-scripts/dist/template').templateUpdate;
var copyUpdate = require('@ionic/app-scripts/dist/copy').copyUpdate;
var sassUpdate = require('@ionic/app-scripts/dist/sass').sassUpdate;
// https://www.npmjs.com/package/chokidar
module.exports = {
watchers: [
{
paths: [
'{{TMP}}/**/*.js'
],
callback: buildUpdate
},
{
paths: [
'{{SRC}}/**/*.html'
],
options: { ignored: /(index.html$)/ },
callback: templateUpdate
},
{
paths: [
'{{SRC}}/**/*.scss'
],
callback: sassUpdate
},
{
paths: [
'{{SRC}}/assets',
**'{{SRC}}/index.html'**
],
callback: copyUpdate
}
]
};
Which @ionic/app-scripts version are you using?
0.0.28