1 Star 0 Fork 0

litial/iptvnator

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
angular.webpack.js 984 Bytes
一键复制 编辑 原始数据 按行查看 历史
4gray 提交于 2021-12-09 18:29 . chore: update angular and electron
//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;
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/litial/iptvnator.git
[email protected]:litial/iptvnator.git
litial
iptvnator
iptvnator
electron

搜索帮助