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

SvelteKit query-string adapter #110

Open
falkomerr opened this issue Apr 21, 2024 · 3 comments
Open

SvelteKit query-string adapter #110

falkomerr opened this issue Apr 21, 2024 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@falkomerr
Copy link

When using query string in SvelteKit I get this error:
Avoid using history.pushState(...) and history.replaceState(...) as these will conflict with SvelteKit's router. Use the pushState and replaceState imports from $app/navigation instead.

@yumauri
Copy link
Owner

yumauri commented Apr 21, 2024

I'm not familiar with SvelteKit, unfortunately, but it would be great, if you could contribute and make a PR with such adapter :)

@yumauri yumauri added enhancement New feature or request help wanted Extra attention is needed labels Apr 21, 2024
@falkomerr
Copy link
Author

falkomerr commented Apr 21, 2024

I just changed the adapter.ts like this: https://pastebin.com/uC6wR0LH

Can you create a PR with this adapter for SvelteKit? I just haven't created a repository for it.

@yumauri
Copy link
Owner

yumauri commented Apr 21, 2024

It is not that simple like this. At least there should be tests and documentation. And I don't know, how to test library with SvelteKit, maybe there should be tests with some empty application build. Import from '$app/navigation' works fine inside your SvelteKit application, but I have doubts that it will work inside a library. Builders and packagers usually have different rules for your application code and code from library from node_modules folder.

Maybe it could be covered by adding support for custom history adapter 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants