Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

SvelteKit routing not working ('/src/routes/about/+page.svelte' not mapped to '/about')

$
0
0

I'm very new to sveltkit. Just followed supabase-svelte app refered to this link. The supabased examples work good as it says.

Now I tried another things like routing reffering the official doc. It seems pretty easy and simple but not working for me.

This is my src structure

enter image description here

and the +page.svelte :

<h1>About this site</h1><p>TODO...</p><a href="/">Home</a>

And when I access to http://localhost:5173/about, it just seems main App.svelte.

This is my App.svelte just same as supabase-svelteapp.

<script lang="ts">    import { onMount } from 'svelte'    import { supabase } from './supabaseClient'    import type { AuthSession } from '@supabase/supabase-js'    import Account from './lib/Account.svelte'    import Auth from './lib/Auth.svelte'    let session: AuthSession | null    onMount(() => {      supabase.auth.getSession().then(({ data }) => {        session = data.session      })      supabase.auth.onAuthStateChange((_event, _session) => {        session = _session      })    })</script><div class="container" style="padding: 50px 0 100px 0">    {#if !session}<Auth />    {:else}<Account {session} />    {/if}</div>

I googled a lot, but coudln't find anything helpful..


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>