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

Is there an alternative to the "Failed to fetch dynamically import problem" issue in Vite + Svelte spa environment? #307

Open
Neptunium1129 opened this issue Oct 5, 2023 · 1 comment

Comments

@Neptunium1129
Copy link

Neptunium1129 commented Oct 5, 2023

Is there an alternative to the "Failed to fetch dynamically import problem" issue in Vite + Svelte environment?

image

example )

router.onError((error, to) => {
  if (error.message.includes('Failed to fetch dynamically imported module') || error.message.includes("Importing a module script failed")) {
    window.location = to.fullPath
  }
})

external communities is that it is better to handle it in the router.

@ItalyPaleAle
Copy link
Owner

I am not sure I understand, sorry. Could you share some more details on the error?

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