question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vite reads electron base path in a project using vue-cli-plugin-electron-builder.

See original GitHub issue

Vite 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:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
IndexXuancommented, May 26, 2021

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

0reactions
IndexXuancommented, May 25, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found