What's new in Angular CLI 12.1?

Angular CLI 12.1.0 is out!✨

If you want to upgrade to 12.1.0 without pain (or to any other version, by the way), I have created a Github project to help: angular-cli-diff. Choose the version you’re currently using (12.0.0 for example), and the target version (12.1.0 for example), and it gives you a diff of all files created by the CLI: angular-cli-diff/compare/12.0.0…12.1.0. It can be a great help along with the official ng update @angular/core @angular/cli command. You have no excuse for staying behind anymore!

Let’s see what we’ve got in this release.

TypeScript 4.3

Angular now supports TS 4.3, and so does the CLI. You can read the announcement post on the Microsoft blog to learn more about the new TS features.

Production configuration

The --prod flag of ng build and ng serve is deprecated since CLI v12. When upgrading to v12.1, a migration will run and replace the deprecated --prod with --configuration production in the scripts section of the package.json.

ng generate

When generating a component, it is now possible to specify style=none to avoid generating a style file. Previously it was only possible to specify css, scss, sass or less, all of which were generating a style file.

Experimental faster builds

An experimental persistent build cache can be enabled by running:

NG_PERSISTENT_BUILD_CACHE=1 ng serve

This should improve cold build times, as it causes node_modules to be treated as immutable by Webpack.

You can check what’s new in the framework for this v12.1 release in our other blog post.

All our materials (ebook, online training and training) are up-to-date with these changes if you want to learn more!



blog comments powered by Disqus