Đó là tsconfig.js tôiKhông thể để tự động transpile ES mô-đun System.config ({transpile: 'transpile-mô-đun'})
{
"compilerOptions": {
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"moduleResolution": "node",
"target": "es5",
"module": "system",
"noImplicitAny": false,
"outDir": "built",
"rootDir": ".",
"sourceMap": false
},
"exclude": [
"node_modules"
]
}
tôi transpiling tôi 'hello-góc. ts 'thành' hello-angular.js 'bằng lệnh tsc
. Và nhập khẩu bởi System.import ('built/hello-angular')
Khi im máy chủ bắt đầu tôi đã có err trong trình duyệt Unable to dynamically transpile ES module A loader plugin needs to be configured via
SystemJS.config ({transpiler: 'transpiler-mô-đun'}) ` '
Tôi không hiểu, tại sao systemjs cố gắng để transpile tập tin ES5 .. tôi đã được thiết lập system.config ({transpiler: false}), nhưng nó didnt giúp ..