最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

typescript - Why is my Electron application failing to load assets? - Stack Overflow

programmeradmin3浏览0评论

Here is my web export options in app.json

    "web": {
      "bundler": "metro",
      "output": "single",
      "favicon": "./assets/images/favicon.png"
    },

I changed the load source from "index.html" to "dist/index.html" as follows

  mainWindow.loadFile(path.join(__dirname, 'dist/index.html'));

After the app loads(electron app) there is a lot of complaints(from the console) about assets not being found and being relative to "C:\" for example C:\assets\..

发布评论

评论列表(0)

  1. 暂无评论