1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-26 05:03:33 +00:00

[PM-25910] Refactor webpack config (#16616)

This commit restructures the webpack configs for each project (i.e. web, browser, desktop, cli) such that each project has a base config that is shared in a way that requires less hard-coding of info, and more like simply calling a function with a few properties.
This commit is contained in:
Derek Nance
2025-10-06 15:31:06 -05:00
committed by GitHub
parent f29e5e223d
commit 9aed9aa08e
12 changed files with 907 additions and 877 deletions

View File

@@ -1,12 +1,10 @@
const { AngularWebpackPlugin } = require("@ngtools/webpack");
const { buildConfig } = require("../../apps/web/webpack.base");
const webpackConfig = require("../../apps/web/webpack.config");
webpackConfig.entry["app/main"] = "../../bitwarden_license/bit-web/src/main.ts";
webpackConfig.plugins[webpackConfig.plugins.length - 1] = new AngularWebpackPlugin({
tsconfig: "../../bitwarden_license/bit-web/tsconfig.build.json",
entryModule: "bitwarden_license/src/app/app.module#AppModule",
sourceMap: true,
module.exports = buildConfig({
configName: "Commercial",
app: {
entry: "../../bitwarden_license/bit-web/src/main.ts",
entryModule: "../../bitwarden_license/bit-web/src/app/app.module#AppModule",
},
tsConfig: "../../bitwarden_license/bit-web/tsconfig.build.json",
});
module.exports = webpackConfig;