我正在dist
文件夹中构建一个vue项目。在dist/index.html
文件中,我看到:
<script type="module" crossorigin src="/assets/index-45e10fce.js"></script>
<link rel="stylesheet" href="/assets/index-c05fc592.css">
字符串
当我运行npm run electron:start
时,我看到错误Failed to load resource: net::ERR_FILE_NOT_FOUND
和window.location.href = file:///home/alex/logseq-PersonalNetwork/vue-personalNetwork/dist/index.html
如何在vue 3 +电子项目中修复资产寻址?
1条答案
按热度按时间vmdwslir1#
它帮助我将行
base: './'
添加到vite.config.ts
参见:Unable to change the publicPath in Vue 3 with Vite.js