如何在Electron-Builder中为可移植exe排除node_modules内部的node_modules

问题描述

嗨,我正在构建一个基于电子的便携式exe文件,我发现app.asar文件包含node_modules/third-party-library/node_modules/some_files。我想排除app.asar中的node_modules内部的node_modules文件夹。我在package.json中添加了以下内容。我正在使用最新版本的Electron-Builder。

"files": [
 "!**/node_modules/third-party-npm-pkg/node_modules/json2typescript","!**/node_modules/third-party-npm-pkg/node_modules/tslib",],

我还通过了以下链接,该链接对我没有帮助。在我的情况下,node_modules包含内部node_modules。我不想包含最里面的node_modules

How should i exclude all node_modules in electron-packager

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)