🔗Angular 10 Released
Since Angular v9 and Ivy were only released 4 month ago, it is very exciting to see Angular v10.0.0 released on June 25th. v10 doesn't have a ton of features, but still it offer several improvements!
🔗What's new in the release
🔗Angular Material New Date Range Picker
Angular material introduces a new date range picker component. For more information, please check the doc here.
🔗Warnings about CommonJS imports
If you use a dependency which is packaged with CommonJS, it can result in a larger bundle size, since it will be harder for webpack to tree shake. Minko wrote a great article about why this is, here.
In Angular v10, if the dependency is CommonJS packaged, the CLI will give you a warning. I, for one, hope more and more libraries will use the ESM bundle instead.
Angular CLI introduces a
--strict option when you create a new project.
ng new --strict
It will do the following things:
- Enable strict mode in Typescript compile options
- Enable strict template check of Angular. For details, check the doc here.
- Reduce default bundle budgets by ~75%.
- Config linting rules to prevent declarations of type 'any'.
- Config your app as side effect free to enable advanced tree shaking. For more detail, check the doc here.
🔗Update the version of the dependencies
- Typescript has been updated to 3.9
- TSLib has updated to 2.0
- TSLint has updated to v6
🔗Update the browser configuration
Also the default supported browsers have been updated to exclude some old browsers, and include the new version. And you can update the browsers support by updating the
Angular Package Format no longer includes
FESM5 bundles. It saves a lot of download and installation time. Those bundles are no longer needed, since now, the ES5 support is done at the end of the build by babel.
And also finally IE 9, 10, and Internet Explorer Mobile, are marked as deprecation, and will not be supported at v11.
There are several performance improvements about
compiler-cli. So now,
build will be faster than v9.
🔗How to update to v10
Just use Angular CLI, and run
ng update @angular/cli @angular/core
For more details, please check the official blog here.