Webpack migration

Of course, using Webpack require a little commitment of time, but we get all of the benefits of managing separate dependencies and performance improvements. I've prepared a detailed migration plan to move from SystemJS to Webpack painlessly.

Installing Webpack CLI

Before using it, we must install Webpack globally. Run the following command in the Terminal to make the command available:

npm install -g webpack

Updating packages

We've used the lite-server to serve our application until now. Webpack has its own webpack-dev-server , a little Node.js Express server to serve bundles via Webpack middleware. The webpack-dev-server is a separate npm package, so we need to update devDependencies in the package.json accordingly:

"devDependencies": ...

Get Web Development with Bootstrap 4 and Angular 2 - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.