Closed LouisMazel closed 1 year ago
Hey 👋
Thanks feedback, we need to use http://localhost:port
based on http
ensure the HMR works.
So, I'll try resolve it.
Hi,
Sorry I forgot to mention it but my issue concerns the production mode. The bug appears only with the built app.
That why the bug appear with the file ´index.html´
You can try tu use v0.5.0
again
Still has the BUG :(
I upgraded:
And I don't have the bug anymore!
Thanks
Bug
In your "quick-start" example, at the first open of the application all is good, the application load the index.html from the
.output/public
But when you reload the app with "CMD + R", the
index.html
is not found.The url/path provided with
win.loadFile(path.join(process.env.VITE_PUBLIC!, 'index.html'))
inelectron/main.ts
doesn’t seem to be good.The request URL is:
file:///Users/mazel/Downloads/nuxt-electron-main/examples/quick-start/release/0.0.0/mac-arm64/nuxt-electron-quick-start.app/Contents/Resources/app/.output/public/Users/mazel/Downloads/nuxt-electron-main/examples/quick-start/release/0.0.0/mac-arm64/nuxt-electron-quick-start.app/Contents/Resources/app/.output/public/index.html
but should be
file:///Users/mazel/Downloads/nuxt-electron-main/examples/quick-start/release/0.0.0/mac-arm64/nuxt-electron-quick-start.app/Contents/Resources/app/.output/public/index.html
An unexpected path is added at the beginning after
file://
:Users/mazel/Downloads/nuxt-electron-main/examples/quick-start/release/0.0.0/mac-arm64/nuxt-electron-quick-start.app/Contents/Resources/app/.output/public
Solution ?
It's not possible to load a file from the Application Contents directly?
Something like:
mainWindow.loadURL('app://./.output/public/index.html')