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:
@@ -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",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user