How to Set Up ELECTRON in Vite and Vue 3

  Рет қаралды 27,824

LearnVue

LearnVue

Күн бұрын

Пікірлер: 74
@gustavogomez8337
@gustavogomez8337 2 жыл бұрын
Awesome starter video! Please make this a video series!
@극곰-d6l
@극곰-d6l 6 ай бұрын
package.json remove -- "type": "module", vite.config.js base: './', // path.resolve(__dirname, "dist"), :: Vite by default processes asset files (images, CSS, JS, etc.) as absolute paths, not relative paths. If you open the index.html file directly from the file system, these absolute paths may not work properly.
@alexnik197
@alexnik197 2 ай бұрын
The awesome answer! Thanks! it really helps me
@puggaming4386
@puggaming4386 2 ай бұрын
Thanks!
@thomasnixon9585
@thomasnixon9585 2 жыл бұрын
This is a good start! Although I'm finding it very difficult to find a simple explanation on how to use the native OS features with vite/electron with something like the ipc renderer and ipc main. Most explanations point to doing this with Vue Cli or a complex starter template written with Typescript. A video on setting up a simple app that can open a native dialog and write to a file with vue/vite (not vue cli) would be awesome!
@vivekascoder
@vivekascoder 3 жыл бұрын
It would be really nice to make a series on a large vue electron app. Super excited.
@mohtasimhasan1928
@mohtasimhasan1928 3 жыл бұрын
I wish, it will be happen!
@LearnVue
@LearnVue 3 жыл бұрын
Any ideas for cool electron app projects? I'd love to hear what you're interested in.
@vivekascoder
@vivekascoder 3 жыл бұрын
@@LearnVue Ohhk, Let me think
@vivekascoder
@vivekascoder 3 жыл бұрын
@@LearnVue One more think make a discord server for your channel as well, That would be amazing.
@bogdanlupu3679
@bogdanlupu3679 3 жыл бұрын
@@LearnVue it would be nice if would be a series that would teach the basics of vue some settings for electron. A searching for movies app with some external api calls ( fetch or axios ) and maybe with vuex as state management. It would be a nice project that would tackle all important stuff in vue and some stuff regarding electron setup. (Window menus popup and secondary windows management)
@Imaginativeone_DF
@Imaginativeone_DF 2 жыл бұрын
May I see a tutorial for seeing Bootstrap (Latest)?
@codybontecou
@codybontecou 3 жыл бұрын
A tutorial on deploying this would be helpful.
@LearnVue
@LearnVue 3 жыл бұрын
Of course - definitely will add that if I make a full mini series of developing in Electron!
@nikolaykolev5143
@nikolaykolev5143 2 жыл бұрын
Yes, please!
@AliBaBasX
@AliBaBasX Жыл бұрын
I have a problem I did everything you told me to do but when I run the electron command does not show anything. When I run it on web tells me that DNS can not be reached . Do you maybe know what the problem is ?
@venegrad
@venegrad Жыл бұрын
have an issue, main route is not loading "/", when electron starts he is loading empty route
@Imaginativeone_DF
@Imaginativeone_DF 2 жыл бұрын
May I see a tutorial for adding SQLite?
@efo7783
@efo7783 3 жыл бұрын
Waiting for more vite + electron js tutorial 😬😬😬
@LearnVue
@LearnVue 3 жыл бұрын
They're coming! What kind of projects would you like to see me build?
@forkerion
@forkerion 2 жыл бұрын
How to do routing, so I can have another window with a different view??
@lunarmagpie4305
@lunarmagpie4305 3 жыл бұрын
Nice tutorial! You explained how it works really well.
@LearnVue
@LearnVue 3 жыл бұрын
thank you!
@josuemarroquin8010
@josuemarroquin8010 Жыл бұрын
I did everything you did but it didn't pull me, could you help me?
@JenuelDevTutors
@JenuelDevTutors 3 жыл бұрын
how about live edit in electron
@LearnVue
@LearnVue 3 жыл бұрын
Yes - there's just two steps. 1 - inside main.js, change `the win.loadPage` to `win.loadURL('localhost:3000')` or wherever your local Vue is running. 2. before running electron:start, start up your Vue app in another terminal tab. then while its running, you can run electron:start for dev purposes. hope this helped!
@TruePac
@TruePac 3 жыл бұрын
@@LearnVue this is giving me an ``Internal server error: Invalid character in header content ["Location"]``, any ideas?
@wokle7794
@wokle7794 2 жыл бұрын
how do I configure hot reload ?
@ragnadrok7
@ragnadrok7 2 жыл бұрын
I use a plugin vite-plugin-electron which seems pretty good for development. after configuring, running vite script just starts up an electron app.
@Imaginativeone_DF
@Imaginativeone_DF Жыл бұрын
How do I add Vue Devtools to this setup?
@davidvelasquez9356
@davidvelasquez9356 19 күн бұрын
We're still waiting on the larger tutorial!
@Thehighschoolscientistforever
@Thehighschoolscientistforever 3 жыл бұрын
Hey I need some help I'm totally confused, I just completed my project, and I have no idea how to take it online... I created a business management app on windows using electron and a client app on Android, how do I connect them together such that they can send and receive data and update each other, and I would also like to give an option to the user to back up there data some were (maybe to my own raspberry pie).. The apps are complete just the part were I have to link them together to send & receive data is were I have no idea what to do or were to get started Need some ( maybe a lot of guidance )
@vedaprakashms
@vedaprakashms 3 жыл бұрын
How to build app using Electron-builder ? can you make a video about that ?? Thanks in advance :)
@LearnVue
@LearnVue 3 жыл бұрын
thanks for the idea! will definitely look into it.
@Credi6464
@Credi6464 Жыл бұрын
Please, go for a full app with vue + electron, I would love e to see it!
@not_normis
@not_normis 2 жыл бұрын
I'd love to see more videos on Vue with Electron. Can you explain in the future vides how well Vue width Electron perform in comparison to other ways of creating desktop apps?
@fuggeldev
@fuggeldev 2 жыл бұрын
Nice tutorial! How do i actually deploy the electron app?
@rushtothemax76
@rushtothemax76 3 жыл бұрын
nice tutorial! but can you maybe also show or tell us how vue works with the ipc renderer and ipc main
@EDUARDO-nm1so
@EDUARDO-nm1so Жыл бұрын
when i export program dont work
@neonboy22
@neonboy22 3 жыл бұрын
Loving your series. Thanks. My request for electron would be to show the differences when creating for web vs standalone. E.g. if I'm talking to a server from the webpage version - does it work the same for a standalone in electron ? My other requests would be: - Using vite and Vue but rebuilding for submission to codepen when demonstrating a vue file example. - Also Vue3, Vite and sygdotjs where the ref component is an array of lists of values used to (say) construct a grid of coloured svg circles which take click events to adjust an svg param stored in the array. I'm having difficulty when I get this deep. So programmatically updating the array is reflected in the drawn svg ui and click events which update params are sent back to the array to keep it correct as the master.
@LearnVue
@LearnVue 3 жыл бұрын
Thanks for the feedback, I'm definitely looking into adding more Vite and Electron tutorials!
@neonboy22
@neonboy22 3 жыл бұрын
@@LearnVue I found a Vue and svgdotjs example here. It is in Vue2 rather than the component form. I will be trying to convert it and use the script setup approach. Lots of use of this and v$ however. - blog.carbonteq.com/creating-interactive-map-in-vue-js/ Vue3 does seem to make it much easier to have reactive dynamic arrays. I have a Playcanvas app with Vue2 in it that was difficult because of that.
@vivekascoder
@vivekascoder 3 жыл бұрын
@LearnVue can you make a video on making a pwa from existing vue project.
@maverickchan9552
@maverickchan9552 2 жыл бұрын
I wonder why images not displayed?
@kkadir
@kkadir Жыл бұрын
Thanks a lot for this excellent tutorial.
@DarkzarichV2
@DarkzarichV2 3 жыл бұрын
Can't make Vite accept Node builtins such as fs etc... Using Electron
@DarkzarichV2
@DarkzarichV2 3 жыл бұрын
UPD: if anyone ever faces this issue the answer is using preload.js, ipcRenderer, ipcMain and contextBridge.exposeInMainWorld
@mohamedabdelmagid3014
@mohamedabdelmagid3014 2 жыл бұрын
Nice, but it doesn't reload automatically :(
@caffeinecat5194
@caffeinecat5194 Жыл бұрын
is there any way adding hotreload?
@guipe7712
@guipe7712 2 жыл бұрын
Cool and interesting video. Very helpful
@AlexeyDzuba
@AlexeyDzuba 3 жыл бұрын
very cool tutorial!
@abderrahmanemr
@abderrahmanemr 3 жыл бұрын
Could you make it live reload for speed dev
@LearnVue
@LearnVue 3 жыл бұрын
Yes - there's just two steps. 1 - inside main.js, change `the win.loadPage` to `win.loadURL('localhost:3000')` 2. before running electron:start, start up your Vue app in another terminal tab. then while its running, you can run electron:start for dev purposes. hope this helped!
@simonediricco1980
@simonediricco1980 2 жыл бұрын
Hi, anyone who made a boilerplate vue3, Pinia, Typescript, vue router and electron? I have not been successful
@hogaz3497
@hogaz3497 5 ай бұрын
hello, do you has used [vite-electron] cli to build your program?
@Imaginativeone_DF
@Imaginativeone_DF Жыл бұрын
This tutorial results in these Electron errors: 2023-02-12 07:35:20.724 Electron[18244:427150] ASB: LNW 2023-02-12 07:35:33.037 Electron[18244:427150] ASB: LNW (null) (null) (null) 2023-02-12 07:35:33.042 Electron[18244:427150] ASB: LNW (null) (null) (null) 2023-02-12 07:35:33.044 Electron[18244:427150] ASB: LNW (null) (null) (null)
@bulp9893
@bulp9893 11 ай бұрын
Hot reload 😢 missing
@surferriness
@surferriness 11 ай бұрын
had to ``` import * *as path from 'path' ``` since my thingy doesn't support dynamic require fsr
@eliranmauda
@eliranmauda 2 жыл бұрын
Please make a follow up
@xiongchun
@xiongchun 9 ай бұрын
good job
@DanielTames
@DanielTames 2 жыл бұрын
awesome!!
@ahonui
@ahonui Жыл бұрын
This video is invalid already since require for path is not longer supported. Also, Electron's documentation is buggy since 'const path = require('node: path') is no longer valid.
@angelhdzdev
@angelhdzdev 2 жыл бұрын
I have no luck following tutorials 😂, I follow them religiously step by step and always end with errors... The Vue logo doesn't load... help? 🤦‍♂️ Edit: The weirdest thing is the assets folder gets compiled in the dist folder along with the Vue logo and all... but it won't load...
@angelhdzdev
@angelhdzdev 2 жыл бұрын
UPDATE: I found out the reason of the image not loading. The compiled .js file, has a messed up URL of the Vue logo image: var m="/C:UsersAngelHdzDocumentsDevelopmentJavaScriptprojects\vite_electron\vite-projectdist/assets/logo.03d6d6da.png" I don't have any idea why this is happening. But I solved it by adding the correct "/" in the path to separate the directories.
@angelhdzdev
@angelhdzdev 2 жыл бұрын
UPDATE #2: It was path.resolve()'s fault. As per an answer I found, I replaced path.resolve(__dir, "./dist") from base in Vite's config, by an empty string, executed npm run build, then npm run electron:start, and it worked right away.
@wsr6
@wsr6 2 жыл бұрын
@@angelhdzdev But __dir is not exist, can you tell me the answer of the 'base' key?
@saipraneethkonda4713
@saipraneethkonda4713 3 жыл бұрын
Full stack app with python backend and vue 3 front end please.
@dayzmelttogether
@dayzmelttogether 2 жыл бұрын
is this a dead technology?
@Trance_Code
@Trance_Code Жыл бұрын
after a year your comment is dead 😂😂😂
@DaryaIbrahim
@DaryaIbrahim 2 жыл бұрын
I don't know when this video was published, but we need an update on the subject, since all technologies have changed and Tailwind is important for us vuers ❤️
Stop Using .value with ref In Vue 3! Reactivity Transformed Explained!
14:22
Building Desktop Apps with Vue - VueConf US 2023
8:09
Vue Mastery
Рет қаралды 7 М.
Sigma girl VS Sigma Error girl 2  #shorts #sigma
0:27
Jin and Hattie
Рет қаралды 124 МЛН
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН
Непосредственно Каха: сумка
0:53
К-Media
Рет қаралды 12 МЛН
Vite для быстрой разработки и сборки приложения
10:49
Михаил Непомнящий
Рет қаралды 74 М.
🙅‍♂️🙆‍♀️ VUE 3 Ролевая модель, ограничения доступов
23:39
Мастерская разработчика
Рет қаралды 10 М.
Pinia Simplified
4:28
LearnVue
Рет қаралды 126 М.
Learn Pinia in 30 MINUTES! (Vue JS 3)
33:58
Make Apps with Danny
Рет қаралды 123 М.
Building a Reusable Tabs Component with Vue Slots
8:21
LearnVue
Рет қаралды 33 М.
Sigma girl VS Sigma Error girl 2  #shorts #sigma
0:27
Jin and Hattie
Рет қаралды 124 МЛН