Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 in [email protected] production build #78

Open
abarke opened this issue May 14, 2024 · 3 comments
Open

404 in [email protected] production build #78

abarke opened this issue May 14, 2024 · 3 comments

Comments

@abarke
Copy link

abarke commented May 14, 2024

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: nuxt/nuxt#15629 (comment)

------------------------------
- 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
Copy link
Author

abarke commented May 14, 2024

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

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

@abarke
Copy link
Author

abarke commented May 14, 2024

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 abarke changed the title 404 in electron production build 404 in [email protected] production build May 14, 2024
@lukangkang
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants