Where can I find systemjs.config in Ionic 2 Projec

2019-09-09 22:12发布

问题:

I create an pure Ionic 2 project with the command.

ionic start myIonic --v2

The pure project work great, but when I compared the project structure with angularJS 2, I found the "systemjs.config.js" is missing.

My question is could "systemjs.config.js" file be replaceable?

If the answer is positive, what is the alternative file in Ionic2 based project ?

回答1:

i have created a angularjs 2 based poject using angular2-cli using below command.

ng new PROJECT_NAME

when i create the project using angular2 cli, then also its not creating systemjs.config.js file.

link for angular2 cli new app .

And Systemjs.config.js file is creating in angular2 project only if i create quick start application, that too we are only creating manually. as given in official quick start document. link for angular2 quick start app.

So using this 2 examples we can believe that systemjs.config.js file can be replaceable.



回答2:

The angular-cli and ionic moved the build system from SystemJS to Webpack.

For angular

npm uninstall -g angular-cli
npm cache clean
npm install -g angular-cli@latest

Full angular-cli migrate docs: https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.14