]> Untitled Git - lemmy-ui.git/commitdiff
Moving webpack-bundle-analyzer require inside mode check to fix docker.
authorDessalines <tyhou13@gmx.com>
Tue, 27 Jun 2023 12:47:39 +0000 (08:47 -0400)
committerDessalines <tyhou13@gmx.com>
Tue, 27 Jun 2023 12:47:39 +0000 (08:47 -0400)
webpack.config.js

index dcb88c52cb0046e81132b2471b6327586a0d3264..4d95a80c1484e30b5bde627261f25f1a3d57923f 100644 (file)
@@ -6,8 +6,7 @@ const CopyPlugin = require("copy-webpack-plugin");
 const RunNodeWebpackPlugin = require("run-node-webpack-plugin");
 const merge = require("lodash.merge");
 const { ServiceWorkerPlugin } = require("service-worker-webpack");
-const BundleAnalyzerPlugin =
-  require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
+
 const banner = `
   hash:[contentHash], chunkhash:[chunkhash], name:[name], filebase:[base], query:[query], file:[file]
   Source code: https://github.com/LemmyNet/lemmy-ui
@@ -156,6 +155,8 @@ const createClientConfig = (_env, mode) => {
   });
 
   if (mode === "none") {
+    const BundleAnalyzerPlugin =
+      require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
     config.plugins.push(new BundleAnalyzerPlugin());
   }