angular2-notifications
angular2-notifications copied to clipboard
SystemJS - Unable to dynamically transpile ES module
I'm not sure if the issue is related with my SystemJS setup or the module in itself. That being said, I run into to following error when adding angular2-notifications to the systemjs config :
Error: Unable to dynamically transpile ES module
A loader plugin needs to be configured via "SystemJS.config({ transpiler: 'transpiler-module' })"
I use the latest SystemJS module (0.20.14)
The part of systemjs config :
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
map: {
'angular2-notifications': 'npm:angular2-notifications',
...
},
packages: {
'angular2-notifications': {
main: './dist/index.js',
defaultExtension: 'js'
},
...
}
Found why : The module is compiled in es2015, which is apparently not supported by systemjs without external transpiler configured. I guess SystemJS is kinda dead now...
May I ask you why you chose to switch from commonjs to es2015 ? Simple curiosity.
You can close the issue anyway, thanks again for your awesome module btw.
Hey Adam, I face the same problem! Is there a workaround to use this module with SystemJS?
Well you have multiples solutions :
- You can configure a transpiler (typescript, babel...) inside SystemJS
- You can change es2015 to commonjs into the module tsconfig file and compile it again (But when updated, you have to do it again)
- You can migrate your project on ng-cli environment (That's what I did, and beside it's awesome, way better than SystemJS)
I have the same issue and I was unable to get any of the solutions to work, that @AdamSGit suggested
I had a similar issue and this seems to be fixed with the newly released 0.7.6