change(ui): webpack config to use env vars
This commit is contained in:
parent
90bc6bc83e
commit
41178ba841
1 changed files with 1 additions and 1 deletions
|
|
@ -8,8 +8,8 @@ import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|||
import CompressionPlugin from "compression-webpack-plugin";
|
||||
import { EsbuildPlugin } from 'esbuild-loader';
|
||||
|
||||
const dotenv = require('dotenv').config({ path: __dirname + '/.env' })
|
||||
const isDevelopment = process.env.NODE_ENV !== 'production'
|
||||
const dotenv = require('dotenv').config({ path: __dirname + (isDevelopment ? '/.env' : '/.env.production') });
|
||||
const stylesHandler = MiniCssExtractPlugin.loader;
|
||||
const ENV_VARIABLES = JSON.stringify(dotenv.parsed);
|
||||
import pathAlias from './path-alias';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue