1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-23 16:13:21 +00:00

bit desktop commercial sdk support

This commit is contained in:
Derek Nance
2026-02-17 17:30:03 -06:00
parent 7e15d0762d
commit 646ce45386
2 changed files with 14 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ const DEFAULT_PARAMS = {
* tsConfig: string;
* };
* outputPath?: string;
* importAliases?: import("webpack").ResolveOptions["alias"];
* }} params
*/
module.exports.buildConfig = function buildConfig(params) {
@@ -300,6 +301,7 @@ module.exports.buildConfig = function buildConfig(params) {
path: require.resolve("path-browserify"),
fs: false,
},
alias: params.importAliases,
plugins: [new TsconfigPathsPlugin({ configFile: params.renderer.tsConfig })],
},
plugins: [

View File

@@ -31,6 +31,12 @@ module.exports = (webpackConfig, context) => {
),
},
outputPath: path.resolve(context.context.root, context.options.outputPath),
importAliases: [
{
name: "@bitwarden/sdk-internal",
alias: "@bitwarden/commercial-sdk-internal",
},
],
});
} else {
return buildConfig({
@@ -48,6 +54,12 @@ module.exports = (webpackConfig, context) => {
entry: path.resolve(__dirname, "src/preload.ts"),
tsConfig: path.resolve(__dirname, "tsconfig.preload.json"),
},
importAliases: [
{
name: "@bitwarden/sdk-internal",
alias: "@bitwarden/commercial-sdk-internal",
},
],
});
}
};