Creating an admin dashboard, and im worried about my users on my main site

I have a site that is mainly SSG and CSR. now i want to create an /admin/ route where theres gonna be an admin dashboard to work with the database. Would my users need to load a lot of bundle from what i create in the /admin route or dont I have to care about that? The admin route gonna be a lot of SSG and probably some UI library that the users of the site is not using. I dont want my users to load unnecessary stuff. Whats the approach I need to use ? Btw, my site is created with the Pages router
2 Replies
Alex
Alex14mo ago
In Nextjs every page has it’s own source so the pages won’t have data of another route. If you want to make sure you can use the webpack bundle analyzer I think
chip
chip14mo ago
From what you're explaining, no additional js/data will be loaded for the user unless they head over to the the admin route and have access (assuming you're redirecting them right away if they don't have access).
Want results from more Discord servers?
Add your server