F12 console 报错:Failed to load resource: net::ERR_FAILED
这是因为 electron build 时,background-image: url('') 被转换成 app:///img/ ...
参考:
通过在vue.config.js 中添加customFileProtocol,再次打包成功!
javascript
const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
transpileDependencies: ["vuetify"],
pluginOptions: {
electronBuilder: {
customFileProtocol: "./",
},
},
});