Describe the problem
Recently there was a change that updated the $page store which moved the $page.path attribute to $page.url.pathname.
When running an app with paths.base set in svelte.config.js, this changed the properties of the path. Before, $page.path was relative to base set in the config. Now $page.url.pathname is always the full path.
If there was enough demand, it may make sense to make the relative path available through the framework.
Having more than one path may cause confusion to developers new to kit, and if this isn't a common use case it may not make sense.
Describe the proposed solution
Additional attribute path or relpath on the $page store
Alternatives considered
Its not a big deal to write $page.url.pathname.substring(base.length)
Importance
nice to have
Additional Information
No response
Describe the problem
Recently there was a change that updated the
$pagestore which moved the$page.pathattribute to$page.url.pathname.When running an app with
paths.baseset insvelte.config.js, this changed the properties of the path. Before,$page.pathwas relative tobaseset in the config. Now$page.url.pathnameis always the full path.If there was enough demand, it may make sense to make the relative path available through the framework.
Having more than one path may cause confusion to developers new to kit, and if this isn't a common use case it may not make sense.
Describe the proposed solution
Additional attribute
pathorrelpathon the$pagestoreAlternatives considered
Its not a big deal to write
$page.url.pathname.substring(base.length)Importance
nice to have
Additional Information
No response