1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 21:33:27 +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,7 @@
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
const { buildConfig } = require("../../apps/cli/webpack.base");
// Re-use the OSS CLI webpack config
const webpackConfig = require("../../apps/cli/webpack.config");
// Update paths to use the bit-cli entrypoint and tsconfig
webpackConfig.entry = { bw: "../../bitwarden_license/bit-cli/src/bw.ts" };
webpackConfig.resolve.plugins = [
new TsconfigPathsPlugin({ configFile: "../../bitwarden_license/bit-cli/tsconfig.json" }),
];
module.exports = webpackConfig;
module.exports = buildConfig({
configName: "Commercial",
entry: "../../bitwarden_license/bit-cli/src/bw.ts",
tsConfig: "../../bitwarden_license/bit-cli/tsconfig.json",
});