1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Files
browser/bitwarden_license/bit-web/webpack.config.js
Andreas Coroiu 64590cb3c8 [PM-25911] Add commercial sdk internal as dependency (#16883)
* feat: add commercial sdk as optional dependency

* feat: add alias to CLI

* feat: add alias to browser

* feat: add alias to web

* fix: revert optional - we cant omit optional dependencies or the builds break

* feat: remove commercial package from browser build

* feat: remove commercial package from cli build

* feat: remove commercial package from web build

* chore: add commercial sdk to renovate

* fix: windows cli workflow

* fix: accidental change

* feat: add lint for version string

* undo weird merge changes
2025-10-27 15:17:20 +01:00

44 lines
1.4 KiB
JavaScript

const path = require("path");
const { buildConfig } = require(path.resolve(__dirname, "../../apps/web/webpack.base"));
module.exports = (webpackConfig, context) => {
const isNxBuild = context && context.options;
if (isNxBuild) {
return buildConfig({
configName: "Commercial",
app: {
entry: context.options.main
? path.resolve(context.context.root, context.options.main)
: path.resolve(__dirname, "src/main.ts"),
entryModule: "bitwarden_license/bit-web/src/app/app.module#AppModule",
},
tsConfig: "bitwarden_license/bit-web/tsconfig.build.json",
outputPath:
context.context && context.context.root
? path.resolve(context.context.root, context.options.outputPath)
: context.options.outputPath,
importAliases: [
{
name: "@bitwarden/sdk-internal",
alias: "@bitwarden/commercial-sdk-internal",
},
],
});
} else {
return buildConfig({
configName: "Commercial",
app: {
entry: path.resolve(__dirname, "src/main.ts"),
entryModule: "bitwarden_license/bit-web/src/app/app.module#AppModule",
},
tsConfig: path.resolve(__dirname, "tsconfig.build.json"),
importAliases: [
{
name: "@bitwarden/sdk-internal",
alias: "@bitwarden/commercial-sdk-internal",
},
],
});
}
};