How it works...

We first created an array of objects that represent differences in the Webpack configuration. We then mapped each piece of configuration into a larger, common configuration with the help of webpack-merge. When we now call the npm run build command, both the configurations run one after the other.

It's a common convention to postfix the name of the file with min to signal that the file is minified and ready to be used in production.

Get Vue.js 2 Cookbook 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.