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.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
chore(frontend): load dotenv for webpack prod and related changes (#3537)
Prashant Shahi27cda7a437b3
diff --git a/.gitignore b/.gitignoreindex 3627f21481..829e51d9d1 100644--- a/.gitignore+++ b/.gitignore@@ -37,7 +37,7 @@ frontend/src/constants/env.ts**/locust-scripts/__pycache__/**/__debug_bin-frontend/*.env+frontend/.envpkg/query-service/signoz.dbpkg/query-service/tests/test-deploy/data/diff --git a/frontend/.dockerignore b/frontend/.dockerignoreindex 2e3d78bb02..a106e6a11e 100644--- a/frontend/.dockerignore+++ b/frontend/.dockerignore@@ -1,5 +1,4 @@node_modules.vscodebuild-.env.gitdiff --git a/frontend/example.env b/frontend/example.envnew file mode 100644index 0000000000..0ddbfb2837--- /dev/null+++ b/frontend/example.env@@ -0,0 +1,7 @@+NODE_ENV="development"+BUNDLE_ANALYSER="true"+FRONTEND_API_ENDPOINT="http://localhost:3301/"+INTERCOM_APP_ID="intercom-app-id"++PLAYWRIGHT_TEST_BASE_URL="http://localhost:3301"+CI="1"\ No newline at end of filediff --git a/frontend/webpack.config.js b/frontend/webpack.config.jsindex 41f62b5e74..770e40ca30 100644--- a/frontend/webpack.config.js+++ b/frontend/webpack.config.js@@ -26,6 +26,7 @@ const plugins = [}),new webpack.DefinePlugin({'process.env': JSON.stringify({+ NODE_ENV: process.env.NODE_ENV,FRONTEND_API_ENDPOINT: process.env.FRONTEND_API_ENDPOINT,INTERCOM_APP_ID: process.env.INTERCOM_APP_ID,}),diff --git a/frontend/webpack.config.prod.js b/frontend/webpack.config.prod.jsindex a7e83c5fe4..79c6f7857f 100644--- a/frontend/webpack.config.prod.js+++ b/frontend/webpack.config.prod.js@@ -5,6 +5,7 @@ const { resolve } = require('path');const HtmlWebpackPlugin = require('html-webpack-plugin');const CopyPlugin = require('copy-webpack-plugin');const CompressionPlugin = require('compression-webpack-plugin');+const dotenv = require('dotenv');const webpack = require('webpack');const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');const TerserPlugin = require('terser-webpack-plugin');@@ -13,6 +14,8 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');const Critters = require('critters-webpack-plugin');+dotenv.config();+const cssLoader = 'css-loader';const sassLoader = 'sass-loader';const styleLoader = 'style-loader';@@ -31,6 +34,7 @@ const plugins = [new webpack.DefinePlugin({'process.env': JSON.stringify({FRONTEND_API_ENDPOINT: process.env.FRONTEND_API_ENDPOINT,+ INTERCOM_APP_ID: process.env.INTERCOM_APP_ID,}),}),new MiniCssExtractPlugin(),