🔨 Specify if production in webpack build
This commit is contained in:
@@ -4,6 +4,9 @@
|
|||||||
*/
|
*/
|
||||||
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
|
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
|
||||||
|
|
||||||
|
// Get app mode: production, development or test
|
||||||
|
const mode = process.env.NODE_ENV || 'production';
|
||||||
|
|
||||||
// Get current version
|
// Get current version
|
||||||
process.env.VUE_APP_VERSION = require('./package.json').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
|
// Webpack Config
|
||||||
const configureWebpack = {
|
const configureWebpack = {
|
||||||
performance: { hints: false },
|
mode,
|
||||||
|
performance: { hints: (mode === 'development') },
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{ test: /.svg$/, loader: 'vue-svg-loader' },
|
{ test: /.svg$/, loader: 'vue-svg-loader' },
|
||||||
|
|||||||
Reference in New Issue
Block a user