Vite reads electron base path in a project using vue-cli-plugin-electron-builder.
See original GitHub issueVite is will read the basePath to be used in the vue-cli-plugin-electron-builder.
PS E:\Documents\my-electron-project> npm run vite
> my-electron-project@0.0.0 vite
> node ./bin/vite
running: vite --config E:\Documents\my-electron-project\node_modules\vue-cli-plugin-vite\config\index.ts
error when starting dev server:
Error: The following dependencies are imported but could not be resolved:
app://./js/chunk-vendors~0f485567.aa229120.js (imported by E:/Documents/my-electron-project/dist_electron/bundled/index.html)
app://./js/chunk-vendors~45d1a9fe.1855cc83.js (imported by E:/Documents/my-electron-project/dist_electron/bundled/index.html)
app://./js/chunk-vendors~167fad9f.19379aa7.js (imported by E:/Documents/my-electron-project/dist_electron/bundled/index.html)
app://./js/chunk-vendors~e4173fa2.bd5eeaa2.js (imported by E:/Documents/my-electron-project/dist_electron/bundled/index.html)
app://./js/chunk-vendors~d939e436.a66345e0.js (imported by E:/Documents/my-electron-project/dist_electron/bundled/index.html)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
FAQ · Issue #9 · IndexXuan/vue-cli-plugin-vite - GitHub
use VITE_DEBUG=true yarn vite , you will find something. ... Vite reads electron base path in a project using vue-cli-plugin-electron-builder. #31.
Read more >Building an Electron App with VueJS and Vite | Cody Bontecou
Trying to move around the directory structure and changing the file names broke the application. Having to read the documentation to manage something...
Read more >Building a Vue 3 Desktop App with Vite and Electron - LearnVue
We can do this by using the path library and setting the base property in our vite.config.js file. vite.config.js.
Read more >How to Set Up ELECTRON in Vite and Vue 3 - YouTube
In today's video we're going to taking a look at how to build a Vue 3 desktop application from your Vite app.To do...
Read more >An Electron CLI integrated with Vite - DEV Community
In a project where electron-vite is installed, you can use ... property because it is not necessary to set the base public path...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

for example: we have some project use vue-cli-plugin-auto-routing and vue-cli-plugin-mock and so on. we should use this plugin and write vite-plugin-auto-routing and vite-plugin-mock to do the same thing and pass in the vue.config.js#pluginOptions.vite.plugins. see https://github.com/IndexXuan/vue-cli-plugin-vite/issues/9
yes this plugin only do dev(serve). but it seems serve stage read dist as well. I do think it is possible to write vite-plugin do the same thing with vue-cli. e.g.
https://github.com/cawa-93/vite-electron-builder
but it is not easy.