Comments (15)
把electron-updater放在dependencies中
from umi-plugin-electron-builder.
把electron-updater放在dependencies中
您看,确实是在dependecies里。
我刚才检查了打包出来的文件,package.json中只有 electron-devtools-installer
from umi-plugin-electron-builder.
from umi-plugin-electron-builder.
将一些不能打包的包配置在electronBuilder下的externals中,只需要写包名,打包后即可使用
from umi-plugin-electron-builder.
将一些不能打包的包配置在electronBuilder下的externals中,只需要写包名,打包后即可使用
已解决,感谢作者。还想请问一个问题:
我按照 #24 中您的回答,把prefix改为了我司域名,依然无法进行http请求。请问在electron开发中,renderer的请求应该放在主进程中吗? 还是说按照网页开发,把页面请求放在页面中?
from umi-plugin-electron-builder.
将webSecurity设置为false 即可跨域,页面就可以直接请求了
通过contextIsolation设置为true,不开启nodeIntegration ,和contextBridge.exposeInMainWorld调用node环境下的方法,保证安全
from umi-plugin-electron-builder.
将webSecurity设置为false 即可跨域,页面就可以直接请求了
通过contextIsolation设置为true,不开启nodeIntegration ,和contextBridge.exposeInMainWorld调用node环境下的方法,保证安全
感谢作者指点。我刚上手electron,目前做法是开启了nodeIntegration,关闭了contextIsolation,个人感觉主进程与渲染进程通过contextBridge通信有点麻烦,对于以后的代码维护也不太好。请问您有比较好的实践项目吗?想学习一下
from umi-plugin-electron-builder.
将webSecurity设置为false 即可跨域,页面就可以直接请求了
通过contextIsolation设置为true,不开启nodeIntegration ,和contextBridge.exposeInMainWorld调用node环境下的方法,保证安全
页面的http请求应该放在主进程中还是渲染进程中呢?如果放在渲染进程中,按您所说的,可能不安全。如果放在主进程中,每次请求都需要与主进程通信,主进程会因为去做这些请求而卡顿吗
from umi-plugin-electron-builder.
页面的请求放在渲染进程中即可,对node的调用建议使用contextBridge,不建议使用nodeIntegration,开了nodeIntegration才不安全,网页中能执行node代码,就权限太高了,可能会被乱用,应该通过contextBridge限定网页能调用的方法,只要你不从网络加载代码,一般不会有问题
from umi-plugin-electron-builder.
@BySlin 请问作者,public文件夹中的文件,打包之后没有了,这种情况该如何处理呢?
from umi-plugin-electron-builder.
打包后存在啊
如果要public的文件不打包进app.asar,得按electron-builder的方式配置
from umi-plugin-electron-builder.
😓 请问您有什么想法或者思路吗 我顺着您的思路去检查代码
from umi-plugin-electron-builder.
我用您的demo代码尝试了一下,加了public文件夹,打包结果也没有那些静态文件
from umi-plugin-electron-builder.
用双目录结构public得放在src/renderer/下 @hemengke1997
from umi-plugin-electron-builder.
用双目录结构public得放在src/renderer/下 @hemengke1997
谢谢作者,已经解决了。请问这样做的原理是什么呢? 我一直以为public目录位置应该跟APP_ROOT同级,完全没想到要放在APP_ROOT(即rederer)下面
from umi-plugin-electron-builder.
Related Issues (20)
- mac上构建报错 HOT 1
- electron打包无限嵌套 HOT 3
- umi4 已经支持 mpa,插件是否要按 umi4 的 mpa 方案进行改造? HOT 1
- umijs/max 项目报错 AssertionError [ERR_ASSERTION]: Invalid config keys: antd, access, model, initialState, request, layout HOT 1
- umi4下使用pnpm electron:init 一直出问题,有yarn方法么? HOT 5
- umi4 配置项.umirc 不兼容umi插件配置项 HOT 4
- 打包报错 :require() of ES Module HOT 5
- 打包后,无法打开软件
- viteConfig 类型不符 HOT 1
- 使用2.x版本报错Error: Cannot find module 'umi-plugin-electron-builder/lib/createProtocol' HOT 2
- 大神有交流群或帮助文档吗,完全懵逼状态 HOT 4
- pnpm electron:dev 启动 history.push 有问题,本来设置的是hash模式的路由,变成#了 HOT 9
- 关于资源路径的引用 HOT 2
- mac 环境下 运行 build的时候报错 Path is a directory: rm returned EISDIR (is a directory) HOT 40
- 执行打包命令 npm run electron:build:win报错什么意思 HOT 7
- electron打包参数能区分系统吗 HOT 2
- 仓库里examples下的两个例子build都有问题 HOT 8
- main 进程里怎么使用worker呢
- 如何在主进程使用打包配置的环境变量?
- 混合项目中如何在mainWebpackChain中自定义主进程的环境变量? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umi-plugin-electron-builder.