Custom Build Modes with Vue CLI 3 | vue-cli-service build mode
VueCLIisanexcellenttoolforbuilding,scaffoldingandotherwisenot-worrying-aboutsettingupyourVueapplication.Givenitsofficialsupport,it’sthestandardwaytospinupanewVueapplication.OneofthecentralsellingpointsofVueCLI[1]isthatittakescareofalotoftheconfigurationforyousothatyoudon’thavetomanagefiddlywebpacksettingsjusttogetyourprojectupandrunning.However,sometimesyouwanttobeabletofine-tunetheconfigurationofyourapplication.SuchwasthecaseonarecentVueprojectwhereweneededtobeabletopushourVueapplicationton...
Vue CLI is an excellent tool for building, scaffolding and otherwise not-worrying-about setting up your Vue application. Given its official support, it’s the standard way to spin up a new Vue application. One of the central selling points of Vue CLI[1] is that it takes care of a lot of the configuration for you so that you don’t have to manage fiddly webpack settings just to get your project up and running.
However, sometimes you want to be able to fine-tune the configuration of your application. Such was the case on a recent Vue project where we needed to be able to push our Vue application to numerous different environments, with different configurations and different features turned on or off. Vue CLI gives developers plenty of flexibility to do something like this, but it can be tricky to identify everywhere that changes are necessary.
In this post, we’ll go over how to add and configure a custom build mode other than the default production, development and test mode...