Skip to content

resolve() does not account for kit.router.type: 'hash' #14785

@brunnerh

Description

@brunnerh

Describe the bug

For hash based routes to work, the result of the function has to be <base>/#<route-path>, but currently the # is omitted.

Reproduction

StackBlitz

Broken path: <a href={resolve('/about')}>{resolve('/about')}</a><br>
Correct path: <a href="#/about">#/about</a>

Logs

System Info

StackBlitz, Chrome, Windows

"devDependencies": {
	"@fontsource/fira-mono": "^5.2.7",
	"@neoconfetti/svelte": "^2.2.2",
	"@sveltejs/adapter-auto": "^6.1.0",
	"@sveltejs/kit": "^2.43.2",
	"@sveltejs/vite-plugin-svelte": "^6.2.0",
	"svelte": "^5.39.5",
	"svelte-check": "^4.3.2",
	"typescript": "^5.9.2",
	"vite": "^7.1.7"
}

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions