caoxiemeihao / nuxt-electron

Integrate Nuxt and Electron
MIT License
169 stars 18 forks source link

404 in electron@30.0.2 production build #78

Open abarke opened 1 month ago

abarke commented 1 month ago

Seems since upgrading to the latest nuxt, nuxt-electron, and electron v30 after using electron-builder to create an installer and installing it, the 404 issue arises. This never happened before.

See: https://github.com/nuxt/nuxt/issues/15629#issuecomment-2110813784

------------------------------
- Operating System: Windows_NT
- Node Version:     v22.1.0
- Nuxt Version:     3.11.2
- CLI Version:      3.11.1
- Nitro Version:    2.8.1
- Package Manager:  pnpm@8.15.5
- Builder:          -
- User Config:      ssr, router, css, modules, electron, ionic, vite, nitro
- Runtime Modules:  @nuxtjs/ionic@0.13.1, nuxt-electron@0.7.0
- Build Modules:    -
------------------------------
abarke commented 1 month ago

After adding the following to the nuxt config the problem goes away:

export default defineNuxtConfig({
  router: {
    options: {
      hashMode: true,
    },
  },
}
abarke commented 1 month ago

Seems nuxt-electron set's this here https://github.com/caoxiemeihao/nuxt-electron/blob/main/src/index.ts#L177

However since upgrading it seems in a production build that is doesn't work anymore.