It's my tsconfig.js
{
"compilerOptions": {
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"moduleResolution": "node",
"target": "es5",
"module": "system",
"noImplicitAny": false,
"outDir": "built",
"rootDir": ".",
"sourceMap": false
},
"exclude": [
"node_modules"
]
}
i'm transpiling my 'hello-angular.ts' into 'hello-angular.js' using tsc
command. And import by System.import ('built/hello-angular')
When im starting server i've got err in browser
Unable to dynamically transpile ES module A loader plugin needs to be configured via
SystemJS.config({ transpiler: 'transpiler-module' })``
I'm dont understand, why systemjs trying to transpile es5 file.. I was set system.config({transpiler: false}) , but it didnt help..
You need to add a transpiler as noted in the following answer:
Angular 2 - Unable to dynamically transpile ES module, angular2-google-map-auto-complete
In mine it looks like this in systemjs.config.js:
map: {
'plugin-babel': 'npm:systemjs-plugin-babel/plugin-babel.js',
'systemjs-babel-build': 'npm:systemjs-plugin-babel/systemjs-babel-browser.js'
},
transpiler: 'plugin-babel',
Try the following in your tsconfig.json:
"module": "commonjs",
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With