mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-11 04:19:02 +08:00
chore(frontend): load dotenv for webpack prod and related changes (#3537)
* chore(frontend): 🔧 update dotenv and add example.env * chore(frontend): 🙈 update .gitignore and .dockerignore --------- Signed-off-by: Prashant Shahi <prashant@signoz.io>
This commit is contained in:
parent
54a2309d8f
commit
27cda7a437
2
.gitignore
vendored
2
.gitignore
vendored
@ -37,7 +37,7 @@ frontend/src/constants/env.ts
|
||||
**/locust-scripts/__pycache__/
|
||||
**/__debug_bin
|
||||
|
||||
frontend/*.env
|
||||
frontend/.env
|
||||
pkg/query-service/signoz.db
|
||||
|
||||
pkg/query-service/tests/test-deploy/data/
|
||||
|
@ -1,5 +1,4 @@
|
||||
node_modules
|
||||
.vscode
|
||||
build
|
||||
.env
|
||||
.git
|
||||
|
7
frontend/example.env
Normal file
7
frontend/example.env
Normal file
@ -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"
|
@ -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,
|
||||
}),
|
||||
|
@ -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(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user