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

The routing does not take effect and always changes to 404.html #152

Open
exqmjmz opened this issue May 11, 2024 · 0 comments
Open

The routing does not take effect and always changes to 404.html #152

exqmjmz opened this issue May 11, 2024 · 0 comments

Comments

@exqmjmz
Copy link

exqmjmz commented May 11, 2024

svelte version:4.2.12
my app.svelte code

<script lang="ts">
  import { Router } from 'svelte-router-spa'
  import { TestRoutes } from "@/routers/routers";

</script>
<Router {TestRoutes} />

my routers.js code

import Login from "@/pages/login.svelte";

export const TestRoutes = [
    {
        name: '/login',
        component: Login,
    }
]

When I try to access localhost:5173/login, the routing does not take effect.
The routing does not take effect and always changes to 404.html.

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

1 participant