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