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

[vike][Warning] You shouldn't import { something } from 'vike/client/router' when using Server Routing. The 'vike/client/router' utilities work only with Client Routing. In particular, don't import { navigate } nor import { prefetch } as they unnecessarily bloat your client-side bundle sizes. #1449

Closed
arp opened this issue Jan 20, 2024 · 1 comment
Labels

Comments

@arp
Copy link

arp commented Jan 20, 2024

Description

I see this warning in the browser logs:

[vike][Warning] You shouldn't `import { something } from 'vike/client/router'` when using Server Routing. The 'vike/client/router' utilities work only with Client Routing. In particular, don't `import { navigate }` nor `import { prefetch }` as they unnecessarily bloat your client-side bundle sizes.

However, I'm not importing anything from that file anywhere:

% grep -r 'vike/client/router' * | grep -v node
%

What could be the reason this message is shown? Also, maybe the wording could be changed to reflect other possible triggers?

@arp arp added the bug 💥 label Jan 20, 2024
@brillout
Copy link
Member

Probably a duplicate of #1423. You're using 0.4.156 so update to the latest version. If you still get this with the latest version then create a minimal reproduction and I'll re-open.

It's probably a little too early as your startup is in stealth mode, but would sponsoring be on the table? That would make a huge impact.

Any luck on that?

@brillout brillout closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants