Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--webpack.common.js13
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