From 039f480d3af93d5c3612a6cfc34df60aa7419942 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 3 Oct 2019 16:07:06 +0200 Subject: Fix webpack build off CI (#2073) Signed-off-by: Christoph Wurst --- webpack.common.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/webpack.common.js b/webpack.common.js index 41236079b..4368db184 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -2,6 +2,14 @@ const path = require('path'); const BundleAnalyzerPlugin = require('@bundle-analyzer/webpack-plugin') const { VueLoaderPlugin } = require('vue-loader'); +const plugins = [ + new VueLoaderPlugin() +] + +if (process.env.BUNDLE_ANALYZER_TOKEN) { + plugins.push(new BundleAnalyzerPlugin({ token: process.env.BUNDLE_ANALYZER_TOKEN })) +} + module.exports = { entry: path.join(__dirname, 'src/main.js'), output: { @@ -57,10 +65,7 @@ module.exports = { } ] }, - plugins: [ - new BundleAnalyzerPlugin({ token: process.env.BUNDLE_ANALYZER_TOKEN }), - new VueLoaderPlugin() - ], + plugins: plugins, resolve: { extensions: ['*', '.js', '.vue', '.json'], symlinks: false -- cgit v1.2.3