I'm trying to bundle an angular 4.0.0 app.
I've tried browserify but the new angular-loader plugin (that allows for not needing the moduleId in components with templateUrl) does not get called and so the templates end up with the wrong path.
So I moved to systemjs-builder but the problem is that when it runs that plugin it crashes saying that document is not defined.
Is there a way to inject document into the builder?
Or am I doing something wrong?
This is the simple builder I'm testing ( the systemjs-config is the angular quickstart one).
var path = require("path");
var Builder = require('systemjs-builder');
var builder = new Builder('src/frontend', 'src/frontend/systemjs.config.js');
builder .bundle('main.js', 'bundle.js')
.then(function() {
console.log('Build complete');
})
.catch(function(err) {
console.log('Build error');
console.log(err);
});