简体   繁体   中英

How to run Angular 2 (cli) without build?

I use Angular 2 CLI . In order to run the project for debugging, have to execute ng build or ng serve . It is too long. Before, when I used 2 Angular Quick Start package.json there was an opportunity to execute a command that compiles the just-in-time and instantly returns the result.

How do the same on the cli?

With Anguar CLI you need to run ng serve once. It starts the webpack-dev-server and keeps it running. You can start debugging and changing code, and webpack-dev-server will be automatically recompiling your code and re-building the bundles in memory every time you modify your code. All this happens as fast as with SystemJS transpiling in the browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM