diff client/vue.config.js @ 1671:89b38d7e7b6a

included bundleanalyzer buildstep
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 24 Dec 2018 13:58:01 +0100
parents 16fb9667ddf8
children 84d01a536bec
line wrap: on
line diff
--- a/client/vue.config.js	Mon Dec 24 13:30:57 2018 +0100
+++ b/client/vue.config.js	Mon Dec 24 13:58:01 2018 +0100
@@ -1,5 +1,4 @@
 const CopyWebpackPlugin = require("copy-webpack-plugin");
-
 module.exports = {
   outputDir: "../web",
   configureWebpack: {
@@ -13,6 +12,11 @@
       .use(CopyWebpackPlugin, [[{ from: vendorImgPath, to: "img" }]], {
         copyUnmodified: true
       });
+    if (process.env.ANALYZE) {
+      var BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
+        .BundleAnalyzerPlugin;
+      config.plugin("BundleAnalyzerPlugin").use(BundleAnalyzerPlugin, []);
+    }
   },
   css: {
     loaderOptions: {