Upgrading Angular 7 to 8

· 2 min read

Angular 8 was officially released on May 28, 2019. Since my personal blog platform is on Angular 7, I took some time to upgrade and keep up with the technology.

Note: Angular now updates major versions every six months. The last version 7 was released in October last year.

What are the main changes in Angular 8?

  1. Differential Loading [Different browsers can now load different JS files]
  2. Route Lazy Loading Implemented with Dynamic Imports
  3. CLI Workflow Improvements
  4. About Ivy and Bazel, Ivy is the new rendering engine. Currently, Angular's bundle size and performance are still quite criticized, especially compared to React and Vue. So everyone is waiting for this Ivy, hoping to be able to really use it soon.

Personal Opinion

Version 8 has few noteworthy features. After all, it’s an even-numbered version, which is mainly about strengthening and refining rather than major changes. The long-awaited Ivy still isn’t ready, so we’ll have to wait. But keeping up with versions isn’t a bad thing.

Enough talk, let’s look at the upgrade.

Version Upgrade

Here are the version changes before and after my successful upgrade:

Note

  • TypeScript needs to be upgraded to 3.4, as stated on the official website
  • Node needs to be upgraded to 10. For actual projects, it’s recommended to create a .nvmrc configuration file in the root directory to control the project’s Node version

Size Changes

I’m afraid this might disappoint everyone - there’s currently no significant change in bundle size.

NG7

NG8

Note

  • There’s an additional polyfill-es5 file here, which should be the differential loading feature mentioned above. After all, different browsers have different levels of JavaScript support.

Final Thoughts

The upgrade is quite simple with no major pitfalls. However, while upgrading, understanding why these improvements and designs are made is very meaningful. Think about it when you have time.

Reference Documentation