-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: update build method #68
Conversation
因为inject到页面里的脚本是用js写的而不是ts 不过可以把这些只有ts代码用的依赖扔到dev-dep里去 |
没明白要改啥,现在 build 不是正常吗。也就是说 electron 编译的时候读的仍然是 node_modules,这样的话依赖这么放着也没啥问题 说到底我就是不想在编译的时候再重新下一遍依赖,现在 build 正常,我没 get 到问题点 |
顺带给个 collaborator 吧。涉及业务的我 request review 就是了 |
因为有一部分代码是inject到页面里去的,那部分我用JS写的。有可能也要用到JS库,而这里调用是去找node_module的。 |
具体是指哪些 js?src/assets/js 下的文件还是哪的 好吧,总算是看明白了。我看看这玩意能不能改先 |
其实你要是觉得测试的时候每次npm start都要下载依赖很蠢 |
看了下,electron 里自带 node 方法,inject 打个包,然后全局引入 electron 应该就行了 还有就是插件怎么样才算是正常的,我这现在完全是黑箱操作 |
我指的是request库之类的,还有一些解析你游资源的库。 这么说吧,这个项目大概分成了三部分。 A部分就是用的 而publish时候是这样的 至于为什么 最后说点题外话,electron实际上是内嵌了一个node环境。所以这里会有一个坑就是electron的node版本和你本地的node版本不同,导致一些native的包会出错的问题,因此有了electron-rebuild这个玩意(x 另外插件的文档我还没更新,之前大更过一次,一直在咕( |
现在 B、C 部分都是直接编译到 es5 然后复制过去,然后生产环境少依赖 当然我目前对 |
C部分是js,不编译的。因为是inject到页面里的,我个人觉得还是越原生越好 然后你的需求的话其实很简单,只有publish的时候做 |
No description provided.