I import html template files into my javascript components using babel-plugin-transform-html-import-to-string.
When I use watchify, it doesn't update if an html has been changed. Only Javascript file changes. The npm script goes something like this:
watchify -p browserify-hmr -t [babelify ext .js .html] src/index.js -o public/bundle.js
Since this doesn't work I am using watch instead, as shown below, but my builds are at least 5 seconds slower than before, when they were instant.
watch 'npm run browserify' src/ -d --interval=1
where the browserify script is
browserify -t [babelify ext .js] src/index.js -o public/bundle.js
Anyone know how I can run browserify on html file changes without sacrificing fast rebuilds?