Skip to content

Create the extension package #1

@webJose

Description

@webJose

Refer to WJSoftware/svelte-router-core#8 for the original details.

Technical Details

  • Create an implementation of the HistoryApi interface that feeds from page.url from $app/state.
  • Make navigation happen with Sveltekit's own goto, pushState or replaceState imported from $app/navigation.
  • Set @sveltejs/kit as a peer dependency with the appropriate minimum version.
  • Make and export the init() function:
    • It will set implicit mode to 'hash'.
    • Will forward the hashMode option.
    • Will forward the logger option.
    • Will forward the traceOptions option.

Nice-To-Have's

  • An exported global location option with a Sveltekit-specific TypeScript interface that exposes Sveltekit's navigation features.
  • An exported Link component that does the same for navigation links.
  • An exported LinkContext component that supports the additional functions.

The library must work without the nice-to-have items. The stock global location object, Link component and LinkContext component must work OK in Sveltekit projects.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions