feat(webpack): remove outdated Angular Webpack config

This commit is contained in:
4gray committed 2024-12-07 16:34:09 +01:00
1 parent c34a6a94a0
commit 67e2c54e6f
1 file changed
-35
-35
View File
@@ -1,35 +0,0 @@
//Polyfill Node.js core modules in Webpack. This module is only needed for webpack 5+.
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
/**
* 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;
}
}
config.plugins = [
...config.plugins,
new NodePolyfillPlugin({
excludeAliases: ['console'],
}),
];
return config;
};