Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular-CLI: where is the system-config.js

When I initialize an Angular-cli project I don't have a systemjs.config.ts file.

In many angular plugins it's mentioned to adapt the systemjs.config.ts. Example instruction:

and add these lines to 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' },
  };

So where is the systemjs.config.js?

This is a standard angular-cli create 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
like image 705
nehemia Avatar asked Sep 27 '16 08:09

nehemia


People also ask

What is System Config JS?

system. config. js is the one which allows to load modules(node modules) compiled using the TypeScript compiler. map refers to the name of modules to JS file that contains the JavaScript code.

What is angular JSON file in angular?

A file named angular. json at the root level of an Angular workspace provides workspace-wide and project-specific configuration defaults for build and development tools provided by the Angular CLI. Path values given in the configuration are relative to the root workspace folder.


1 Answers

What version of angular-cli are you using? Since 1.0.0-beta.11-webpack they moved the build system from SystemJS to Webpack. You can find this information in the changelog.

like image 65
Markus Török Avatar answered Oct 07 '22 20:10

Markus Török