caoxiemeihao / nuxt-electron

Integrate Nuxt and Electron
MIT License
191 stars 21 forks source link

My build doesn't work #93

Closed pieterjanmaes closed 1 week ago

pieterjanmaes commented 2 weeks ago

Hi,

npm run dev works like a charm! But when I want to build the electron app. I get a white screen.

The index.html seems correct, but my .js and .css files won't load. Does anyone knows how to fix this? (see screenshot below)

Looking for days now 😢

I'm building the Electron app with my MacBook Pro M3 and Node v22.10.0

I'm using the same electron/main.js & electron/preload.js files from the quick-start example.

And These are my dependencies:

"@nuxt/ui": "^2.19.1",
"electron": "^33.2.0",
"electron-builder": "^25.1.8",
"nuxt": "^3.14.159",
"nuxt-electron": "^0.7.0",
"serialport": "^12.0.0",
"vite-plugin-electron": "^0.28.8",
"vite-plugin-electron-renderer": "^0.14.6"

Is it possible to use the latest version of nuxt?

Screenshot 2024-11-14 at 15 39 44
pieterjanmaes commented 1 week ago

I made it work with adding cdnURL: './' to the nuxt.config.ts file

// nuxt.config.ts
app: {
    cdnURL: './',
}