安裝太慢
參照npm的相關(guān)配置
編譯原生模塊
參照http://www.itdecent.cn/p/07a1473ff7fc
使用原生模塊的配置
項(xiàng)目根目錄新建vue.config.js(如果有則不用)
module.exports = {
lintOnSave: false,
pluginOptions: {
electronBuilder: {
externals: ['ffi','serialport','robotjs'], //這里是你使用的原生模塊名字列表,改成自己的即可
nodeModulesPath: ['../../node_modules', './node_modules','../node_modules']//這里是多個(gè)node_modules路徑,按自己需要配置即可
}
}
}