Switching from Angular 4 to Angular 5 requires to perform a manual update to the webpack.config.js file to replace the previous AotPlugin to the new AngularCompilerPlugin: both of them are Webpack plugins that perform an AoT compilation of Angular components and modules. The former has been used since Angular 2 and up to Angular 4, while the latter has been released to work with Angular 5.
Open the webpack.config.js file with the Visual Studio editor and update line 4 in the following way (updated code highlighted):
const AotPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
Right after that, scroll down to the sharedConfig : module : rules section and replace the simple test: /\.ts$/ rule with ...