1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Files
browser/apps/web/webpack.config.js
Andreas Coroiu 7e32d0a59f [PM-27564] Self-host configuration is not applied with nx build (#17279)
* fix: web not using env variables

* fix: apply claude suggestion

* fix: remove non-working serve targets
2025-11-24 16:36:23 +01:00

31 lines
917 B
JavaScript

const path = require("path");
const { buildConfig } = require(path.resolve(__dirname, "webpack.base"));
module.exports = (webpackConfig, context) => {
const isNxBuild = context && context.options;
if (isNxBuild) {
return buildConfig({
configName: "OSS",
app: {
entry: context.options.main
? path.resolve(context.context.root, context.options.main)
: path.resolve(__dirname, "src/main.ts"),
entryModule: "src/app/app.module#AppModule",
},
tsConfig: "apps/web/tsconfig.build.json",
outputPath: path.resolve(context.context.root, context.options.outputPath),
env: context.options.env,
});
} else {
return buildConfig({
configName: "OSS",
app: {
entry: path.resolve(__dirname, "src/main.ts"),
entryModule: "src/app/app.module#AppModule",
},
tsConfig: "tsconfig.build.json",
});
}
};