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

NextTopLoader not working on react based frameworks like vite on nextjs-toploader v2.6.12 #85

Open
TheSGJ opened this issue Aug 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@TheSGJ
Copy link
Owner

TheSGJ commented Aug 27, 2024

NextTopLoader stopped working on react based frameworks like Vite on nextjs-toploader v2.6.12

To fix this issue update nextjs-toploader to latest i.e version 3.6.13 or the newer version.

Why this happened

  • This happened in order to give standalone support to pages router via exporting its new a component that was PagesTopLoader directly to index.tsx component which compiler passed everything from one file because NextTopLoader was exporting everything by default. And since we know that react render only client side components in previous versions that nextjs-toploader made this error happened. react was importing PagesTopLoader through entry point file which Contains SSR components like Router from next/router
@TheSGJ TheSGJ added the bug Something isn't working label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant