2025-10-13 06:31:17 -04:00
|
|
|
const path = require("path");
|
|
|
|
|
const { buildConfig } = require(path.resolve(__dirname, "webpack.base"));
|
2022-02-24 12:10:07 +01:00
|
|
|
|
2025-10-13 06:31:17 -04:00
|
|
|
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),
|
2025-11-24 16:36:23 +01:00
|
|
|
env: context.options.env,
|
2025-10-13 06:31:17 -04:00
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
return buildConfig({
|
|
|
|
|
configName: "OSS",
|
|
|
|
|
app: {
|
|
|
|
|
entry: path.resolve(__dirname, "src/main.ts"),
|
|
|
|
|
entryModule: "src/app/app.module#AppModule",
|
|
|
|
|
},
|
|
|
|
|
tsConfig: "tsconfig.build.json",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|