diff --git a/apps/desktop/webpack.base.js b/apps/desktop/webpack.base.js index 07fbf5d07db..66d27a67601 100644 --- a/apps/desktop/webpack.base.js +++ b/apps/desktop/webpack.base.js @@ -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: [ diff --git a/bitwarden_license/bit-desktop/webpack.config.js b/bitwarden_license/bit-desktop/webpack.config.js index 79b1eefc838..423087b1b4a 100644 --- a/bitwarden_license/bit-desktop/webpack.config.js +++ b/bitwarden_license/bit-desktop/webpack.config.js @@ -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", + }, + ], }); } };