Reputation: 972
I am trying to create a JSPM bundle using Angular 2 version 2.2.1.
Using this command:
jspm bundle @angular/common + @angular/compiler + @angular/core + @angular/forms + @angular/http + @angular/platform-browser + @angular/platform-browser-dynamic + @angular/router + @angular/upgrade
Results in this error:
err SyntaxError: jspm_packages/npm/@angular/[email protected]/src/facade/lang.js: 'import' and 'export' may appear only with 'sourceType: module' (23:0)
Upvotes: 0
Views: 114
Reputation: 972
Turns out Angular2 supports UMD/AMD modules, so JSPM can be set to work like so:
"overrides": {
"npm:@angular/[email protected]": {
"format": "amd"
},
"npm:@angular/[email protected]": {
"format": "amd"
},
"npm:@angular/[email protected]": {
"format": "amd"
},
"npm:@angular/[email protected]": {
"format": "amd"
},
"npm:@angular/[email protected]": {
"format": "amd"
},
"npm:@angular/[email protected]": {
"format": "amd"
},
"npm:@angular/[email protected]": {
"format": "amd"
},
"npm:@angular/[email protected]": {
"format": "amd"
},
Upvotes: 1