diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2019-10-03 17:07:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-03 17:07:06 +0300 |
commit | 039f480d3af93d5c3612a6cfc34df60aa7419942 (patch) | |
tree | db9bffe940e3e778e16dbaff4c7d55fd4c04e68d /webpack.common.js | |
parent | b4ea36114f055cece29d95e4d74ac56982300322 (diff) |
Fix webpack build off CI (#2073)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'webpack.common.js')
-rw-r--r-- | webpack.common.js | 13 |
1 files 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 |