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
2025-10-13 06:31:17 -04:00

30 lines
885 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),
});
} else {
return buildConfig({
configName: "OSS",
app: {
entry: path.resolve(__dirname, "src/main.ts"),
entryModule: "src/app/app.module#AppModule",
},
tsConfig: "tsconfig.build.json",
});
}
};