Create the update-webpack.bat file

The batch file can be a viable alternative if we don't want to delete the /dist/ folder while also avoiding to slowing down our build process.

From Solution Explorer, create a new file within the project's root folder, name it as update-webpack.bat, and fill it with the following contents:

cd %~dp0node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js

The first line tells the file to change the execution folder to the directory hosting the batch file itself; that will allow the batch file to be executed from anywhere, including the Windows GUI with a double-click. The second and last line executes Webpack, passing the webpack.config.vendor.js configuration file as a parameter.

Once done, ...

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.