nuxt-electron icon indicating copy to clipboard operation
nuxt-electron copied to clipboard

404 in [email protected] production build

Open abarke opened this issue 1 year ago • 3 comments

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:  [email protected]
- Builder:          -
- User Config:      ssr, router, css, modules, electron, ionic, vite, nitro
- Runtime Modules:  @nuxtjs/[email protected], [email protected]
- Build Modules:    -
------------------------------

abarke avatar May 14 '24 18:05 abarke

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

export default defineNuxtConfig({
  router: {
    options: {
      hashMode: true,
    },
  },
}

abarke avatar May 14 '24 18:05 abarke

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.

abarke avatar May 14 '24 18:05 abarke

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

export default defineNuxtConfig({
  router: {
    options: {
      hashMode: true,
    },
  },
}

Thank you for your way. I spent a full 5 hours before that. Now it works.

lukangkang avatar Sep 09 '24 01:09 lukangkang