gulp-jspm-build
gulp-jspm-build copied to clipboard
Specify paths
Hi, I try to bundle an angular2 application.
It works from the command line: jspm bundle scripts/app/bootstrap.js with the following config file:
System.config({
defaultJSExtensions: true,
transpiler: false,
paths: {
"angular2/*": "node_modules/angular2/*.js",
"rxjs/*": "node_modules/rxjs/*.js"
}
});
I tried the same with gulp, but it doesnt work. I tries to resovle the angular files from "angular2/core.js" for example:
gulp.task('jspm', function () {
jspm({
bundles: [
{
src: "wwwroot/scripts/app/bootstrap.js",
dst: 'bundle.js'
}
],
configOverride: {
defaultJSExtensions: true,
paths: {
"angular2/*": "wwwroot/node_modules/angular2/*.js",
"rxjs/*": "wwwroot/node_modules/rxjs/*.js"
}
}
})
.pipe(gulp.dest(ts.outFolder));
});
Any ideas? Can you also specify jspm to resovle all missing dependencies from node_modules by default?
I have not tested the plugin with JSPM typescript extension. Does it correctly write the config.js with your specified override? Could you post the content of config.js in ts.outFolder?