Skip to content

Suppress the fetch warning automatically whenever SSR is disabled / hash routing is enabled #13689

@jjgmckenzie

Description

@jjgmckenzie

Describe the problem

It's a little frustrating whenever my console is flooded with messages similar to this when I am developing a hash routing application.

⚡️  [warn] - Loading http://localhost:8090/api/collections/users/auth-refresh using `window.fetch`. For best results, use the `fetch` that is passed to your `load` function: https://svelte.dev/docs/kit/load#making-fetch-requests

My understanding from the docs (please feel free to correct me) is that sveltekit's fetch would have no purpose or advantage whatsoever whenever hash routing is enabled.

(additionally - I am using a third party library so even if there was a purpose to replace the fetch, there would be no way for me to.)

Describe the proposed solution

A check before the warning to determine if it's even recommended.

Potentially related to #13217?

Alternatives considered

It's extremely insignificant and obviously not a priority. I'd submit a PR myself but figured it'd be good practice to write the issue first in case I am missing something.

Using fetch anyway would be my preferred option but not possible in all cases (e.g. third party libraries)

Importance

nice to have

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature / enhancementNew feature or requestneeds-decisionNot sure if we want to do this yet, also design work needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions