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(frontend): alias lodash to lodash-es to survive a page-level AMD loader (#12332)

Ashwin Bhatkale51c4644171f
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
index f6b77b5601..b25766396a 100644
--- a/frontend/vite.config.ts
+++ b/frontend/vite.config.ts
@@ -143,6 +143,12 @@ export default defineConfig(({ mode }): UserConfig => {
plugins,
resolve: {
alias: {
+ // @grafana/data imports bare CJS `lodash`, whose UMD footer checks for an
+ // AMD loader before assigning module.exports. Any third-party script that
+ // defines window.define.amd first leaves the bundled namespace empty, so
+ // every lodash method reached through it is undefined at runtime. lodash-es
+ // is the same version, real ESM, and tree-shakes.
+ lodash: 'lodash-es',
'@': resolve(__dirname, './src'),
utils: resolve(__dirname, './src/utils'),
types: resolve(__dirname, './src/types'),