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;