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

[🐛 Bug]: Adding dynamic routes explodes bundle size #932

Open
1 task
JPBotelho opened this issue Jan 15, 2025 · 0 comments
Open
1 task

[🐛 Bug]: Adding dynamic routes explodes bundle size #932

JPBotelho opened this issue Jan 15, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@JPBotelho
Copy link

next-on-pages environment related information

it gets ran on pages, not locally.

Description

Adding routes to my project increased bundle size from 3KB to 28MB.

By route, I mean a structure in the App router such as "/farm/[farmId]".

The build size is acceptable (about 2mb). Next-on-pages then tacks on massive *.func.js files.

Here are some build logs, showing an increase from 3KB to 9MB (after adding the first few routes). No major changes to the site were made besides routes.

buildWithoutRoutes.log
buildWithRoutes.log

Image
Image
Image
Image

Reproduction

No response

Pages Deployment Method

Pages CI (GitHub/GitLab integration)

Pages Deployment ID

69a0f73b-0890-426c-bb16-9fd13478059e

Additional Information

May be related: #330

getsentry/sentry-javascript#13723

Not sure if this is me misusing next/pages. My apologies if it is.

Would you like to help?

  • Would you like to help fixing this bug?
@JPBotelho JPBotelho added the bug Something isn't working label Jan 15, 2025
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