umbrella22 / electron-vite-template

This project is a vue3 + Vite + electron project template composed of Vite and rollup. It has the same functions as my previous electron+Vue+template project
Other
398 stars 108 forks source link

运行 npm run build:web 会报错 ENOENT: no such file or directory, lstat 'C:\Users\xxx #85

Closed tiajinsha closed 1 year ago

tiajinsha commented 1 year ago

修改如下代码解决

async function web() {
    await deleteAsync(['dist/web/*', '!.gitkeep'])
    console.log(1)
    build({ configFile: join(__dirname, 'vite.config.ts') }).then(res => {
        console.log(`${doneLog}RendererProcess build success`)
        process.exit()
    })
}
tiajinsha commented 1 year ago

网页版运行还白屏

umbrella22 commented 1 year ago

如果你想运行网页版你应当使用严格分支,而不是main分支,main分支中没有在渲染进程中切割electron依赖

umbrella22 commented 1 year ago

image 严格分支是正常的