From 8e87e7ade2069692b5e50838360d1f9058123963 Mon Sep 17 00:00:00 2001 From: aleksandrskondratjevs Date: Tue, 8 Nov 2022 09:14:30 +0200 Subject: [PATCH] Fix bundle analyzer --- packages/bundle-analyzer/build-config/analyzer.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/bundle-analyzer/build-config/analyzer.js b/packages/bundle-analyzer/build-config/analyzer.js index cf21115411..0a73724e41 100644 --- a/packages/bundle-analyzer/build-config/analyzer.js +++ b/packages/bundle-analyzer/build-config/analyzer.js @@ -1,5 +1,4 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); -const { choosePort } = require('react-dev-utils/WebpackDevServerUtils'); module.exports = { plugin: { @@ -12,11 +11,10 @@ module.exports = { const HOST = process.env.HOST || '0.0.0.0'; const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 5000; - const analyzerPort = await choosePort(HOST, DEFAULT_PORT); cracoConfig.webpack.plugins.push(new BundleAnalyzerPlugin({ analyzerHost: HOST, - analyzerPort, + analyzerPort: DEFAULT_PORT, })); return cracoConfig;