From: Dessalines Date: Tue, 27 Jun 2023 12:47:39 +0000 (-0400) Subject: Moving webpack-bundle-analyzer require inside mode check to fix docker. X-Git-Url: http://these/git/readmes/%7B%60%24%7BarchiveTodayUrl%7D/%7B%7D/%22%7B%7D/%22?a=commitdiff_plain;h=20757fa769bf79fb74c43af238d7f982ec227e22;p=lemmy-ui.git Moving webpack-bundle-analyzer require inside mode check to fix docker. --- diff --git a/webpack.config.js b/webpack.config.js index dcb88c5..4d95a80 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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()); }