mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
[EC-473] Add feature flag config and environment loaders to Desktop (#3389)
This commit is contained in:
@@ -5,9 +5,14 @@ const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const { AngularWebpackPlugin } = require("@ngtools/webpack");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const configurator = require("./config/config");
|
||||
|
||||
const NODE_ENV = process.env.NODE_ENV == null ? "development" : process.env.NODE_ENV;
|
||||
|
||||
console.log("Renderer process config");
|
||||
const envConfig = configurator.load(NODE_ENV);
|
||||
configurator.log(envConfig);
|
||||
|
||||
const common = {
|
||||
module: {
|
||||
rules: [
|
||||
@@ -142,6 +147,10 @@ const renderer = {
|
||||
filename: "[name].[contenthash].css",
|
||||
chunkFilename: "[id].[contenthash].css",
|
||||
}),
|
||||
new webpack.EnvironmentPlugin({
|
||||
FLAGS: envConfig.flags,
|
||||
DEV_FLAGS: NODE_ENV === "development" ? envConfig.devFlags : {},
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user