capaj/require-globify lets you write code like
// index.js
const templates = require('./templates/*', { mode: 'hash' });
which at some point expands into
var templates = {
'a': require('./template/a.html'),
'b': require('./template/b.html')
};
When used with browserify-incremental index.js is not rebuilt after contents of the template directory change (like adding or removing a file).
My build script looks like this
// gulpfile.js
var b = browserify(_.defaults({
entries: entries,
debug: true
}, browserifyInc.args));
b.transform('require-globify');
browserifyInc(b, {
cacheFile: './.browserify-incremental-cache.json'
});
Maybe there is a way to make browserify-incremental kick in after require-globify transform?