Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: chunk load webpack error (#4795)

Vikrant Gupta7c93944d4034
diff --git a/frontend/package.json b/frontend/package.json
index e7d1861cd4..96c4b563a2 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -121,6 +121,7 @@
"web-vitals": "^0.2.4",
"webpack": "5.88.2",
"webpack-dev-server": "^4.15.1",
+ "webpack-retry-chunk-load-plugin": "3.1.1",
"xstate": "^4.31.0"
},
"browserslist": {
diff --git a/frontend/webpack.config.prod.js b/frontend/webpack.config.prod.js
index 22e33d7976..0d9a41bcbb 100644
--- a/frontend/webpack.config.prod.js
+++ b/frontend/webpack.config.prod.js
@@ -14,6 +14,7 @@ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const Critters = require('critters-webpack-plugin');
+const { RetryChunkLoadPlugin } = require('webpack-retry-chunk-load-plugin');
dotenv.config();
@@ -71,6 +72,9 @@ const plugins = [
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT_ID,
}),
+ new RetryChunkLoadPlugin({
+ maxRetries: 2,
+ }),
];
if (process.env.BUNDLE_ANALYSER === 'true') {
diff --git a/frontend/yarn.lock b/frontend/yarn.lock
index df275f43e4..70e3f82061 100644
--- a/frontend/yarn.lock
+++ b/frontend/yarn.lock
@@ -13959,6 +13959,11 @@ [email protected]:
resolved "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz"
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
+prettier@^2.6.2:
+ version "2.8.8"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
+ integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
+
pretty-bytes@^5.3.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb"
@@ -17640,6 +17645,13 @@ webpack-merge@^5.7.3:
clone-deep "^4.0.1"
wildcard "^2.0.0"
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/webpack-retry-chunk-load-plugin/-/webpack-retry-chunk-load-plugin-3.1.1.tgz#44aefc21abd01769ecd07f9a200a58a78caf930c"
+ integrity sha512-BKq/7EcelyWUUI6SeBaUKB1G+fSZP0rlxIwRQ+aO6mK5tffljaHdpJ4I2q54rpaaKjSbwbZRQlaITXe93SL9nA==
+ dependencies:
+ prettier "^2.6.2"
+
webpack-sources@^1.3.0:
version "1.4.3"
resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz"