當我初始化一個Angular-cli項目時,我沒有systemjs.config.ts文件。Angular-CLI:其中是system-config.js
在很多角度插件中,提到要修改systemjs.config.ts。舉例說明:
和這些行添加到systemjs.config.js:
var map = {
'angular2-tree-component': 'node_modules/angular2-tree-component',
'lodash': 'node_modules/lodash',
};
var packages = {
'angular2-tree-component' : { main: 'dist/angular2-tree-component.js', defaultExtension: 'js' },
'lodash' : { main: 'lodash.js', defaultExtension: 'js' },
};
那麼,是systemjs.config.js?
這是一個標準的角度-CLI 創建README.md
create src/app/app.component.css
create src/app/app.component.html
create src/app/app.component.spec.ts
create src/app/app.component.ts
create src/app/app.module.ts
create src/app/index.ts
create src/app/shared/index.ts
create src/environments/environment.prod.ts
create src/environments/environment.ts
create src/favicon.ico
create src/index.html
create src/main.ts
create src/polyfills.ts
create src/styles.css
create src/test.ts
create src/tsconfig.json
create src/typings.d.ts
create angular-cli.json
create e2e/app.e2e-spec.ts
create e2e/app.po.ts
create e2e/tsconfig.json
create .gitignore
create karma.conf.js
create package.json
create protractor.conf.js
create tslint.json
沒有'system-config.js'了,因爲cli現在圍繞webpack而不是System.js(hooray!) – drewmoore