mirror of
https://github.com/WowUp/WowUp.git
synced 2026-01-01 20:37:52 -05:00
24 lines
572 B
JavaScript
24 lines
572 B
JavaScript
/**
|
|
* Custom angular webpack configuration
|
|
*/
|
|
|
|
module.exports = (config, options) => {
|
|
config.target = "electron-renderer";
|
|
|
|
if (options.fileReplacements) {
|
|
for (let fileReplacement of options.fileReplacements) {
|
|
if (fileReplacement.replace !== "src/environments/environment.ts") {
|
|
continue;
|
|
}
|
|
|
|
let fileReplacementParts = fileReplacement["with"].split(".");
|
|
if (fileReplacementParts.length > 1 && ["web"].indexOf(fileReplacementParts[1]) >= 0) {
|
|
config.target = "web";
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
return config;
|
|
};
|