我通过运行electron ./dist/main.js
运行电子应用程序
在电子renderer-process
,我加载一个网页,并在网页上运行require('lodash')
。
当我通过http://
加载网页时,我无法获得lodash
模块,但是当我使用file://
时,我明白了。
所以我想知道电子require()
中http
和file
之间renderer-process
的不同之处。
file://
表示您从自己的计算机中获取文件,http://
用于从server
请求文件。