From b31c44f94d9195c9ac6d4e43bb7f7d35b6ed8095 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 21 Dec 2021 19:46:32 +0000 Subject: [PATCH] :hammer: Specify if production in webpack build --- vue.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vue.config.js b/vue.config.js index 00e56296..7b00b43f 100644 --- a/vue.config.js +++ b/vue.config.js @@ -4,6 +4,9 @@ */ const ProgressBarPlugin = require('progress-bar-webpack-plugin'); +// Get app mode: production, development or test +const mode = process.env.NODE_ENV || 'production'; + // Get current version process.env.VUE_APP_VERSION = require('./package.json').version; @@ -22,7 +25,8 @@ const progressFormat = '\x1b[1m\x1b[36mBuilding Dashy\x1b[0m ' // Webpack Config const configureWebpack = { - performance: { hints: false }, + mode, + performance: { hints: (mode === 'development') }, module: { rules: [ { test: /.svg$/, loader: 'vue-svg-loader' },