mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 11:06:16 -08:00
chore: update angular and electron
This commit is contained in:
1 parent
4aaed1cf98
commit
b459bc1d15
5 files changed
+5854
-8384
No files matched your search
+19
-8
@@ -1,24 +1,35 @@
|
||||
//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.customWebpackConfig.target) {
|
||||
config.target = options.customWebpackConfig.target;
|
||||
} else if (options.fileReplacements) {
|
||||
for(let fileReplacement of options.fileReplacements) {
|
||||
|
||||
if (options.fileReplacements) {
|
||||
for (let fileReplacement of options.fileReplacements) {
|
||||
if (fileReplacement.replace !== 'src/environments/environment.ts') {
|
||||
continue;
|
||||
}
|
||||
|
||||
let fileReplacementParts = fileReplacement['with'].split('.');
|
||||
if (['dev', 'prod', 'test', 'electron-renderer'].indexOf(fileReplacementParts[1]) < 0) {
|
||||
config.target = fileReplacementParts[1];
|
||||
if (
|
||||
fileReplacementParts.length > 1 &&
|
||||
['web'].indexOf(fileReplacementParts[1]) >= 0
|
||||
) {
|
||||
config.target = 'web';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
config.plugins = [
|
||||
...config.plugins,
|
||||
new NodePolyfillPlugin({
|
||||
excludeAliases: ['console'],
|
||||
}),
|
||||
];
|
||||
|
||||
return config;
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user