mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
build(desktop): integrate nx (#16860)
This commit is contained in:
@@ -1,18 +1,43 @@
|
||||
const path = require("path");
|
||||
const { buildConfig } = require("./webpack.base");
|
||||
|
||||
module.exports = buildConfig({
|
||||
configName: "OSS",
|
||||
renderer: {
|
||||
entry: "./src/app/main.ts",
|
||||
entryModule: "src/app/app.module#AppModule",
|
||||
tsConfig: "./tsconfig.renderer.json",
|
||||
},
|
||||
main: {
|
||||
entry: "./src/entry.ts",
|
||||
tsConfig: "./tsconfig.json",
|
||||
},
|
||||
preload: {
|
||||
entry: "./src/preload.ts",
|
||||
tsConfig: "./tsconfig.json",
|
||||
},
|
||||
});
|
||||
module.exports = (webpackConfig, context) => {
|
||||
const isNxBuild = context && context.options;
|
||||
|
||||
if (isNxBuild) {
|
||||
return buildConfig({
|
||||
configName: "OSS",
|
||||
renderer: {
|
||||
entry: path.resolve(__dirname, "src/app/main.ts"),
|
||||
entryModule: "src/app/app.module#AppModule",
|
||||
tsConfig: path.resolve(context.context.root, "apps/desktop/tsconfig.renderer.json"),
|
||||
},
|
||||
main: {
|
||||
entry: path.resolve(__dirname, "src/entry.ts"),
|
||||
tsConfig: path.resolve(context.context.root, "apps/desktop/tsconfig.json"),
|
||||
},
|
||||
preload: {
|
||||
entry: path.resolve(__dirname, "src/preload.ts"),
|
||||
tsConfig: path.resolve(context.context.root, "apps/desktop/tsconfig.json"),
|
||||
},
|
||||
outputPath: path.resolve(context.context.root, context.options.outputPath),
|
||||
});
|
||||
} else {
|
||||
return buildConfig({
|
||||
configName: "OSS",
|
||||
renderer: {
|
||||
entry: path.resolve(__dirname, "src/app/main.ts"),
|
||||
entryModule: "src/app/app.module#AppModule",
|
||||
tsConfig: path.resolve(__dirname, "tsconfig.renderer.json"),
|
||||
},
|
||||
main: {
|
||||
entry: path.resolve(__dirname, "src/entry.ts"),
|
||||
tsConfig: path.resolve(__dirname, "tsconfig.json"),
|
||||
},
|
||||
preload: {
|
||||
entry: path.resolve(__dirname, "src/preload.ts"),
|
||||
tsConfig: path.resolve(__dirname, "tsconfig.json"),
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user