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

[NEXT-1142] app increase bundle size of pages #49286

Closed
1 task done
QzCurious opened this issue May 5, 2023 · 4 comments
Closed
1 task done

[NEXT-1142] app increase bundle size of pages #49286

QzCurious opened this issue May 5, 2023 · 4 comments
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team.

Comments

@QzCurious
Copy link

QzCurious commented May 5, 2023

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Fri Apr 2 22:23:49 UTC 2021
Binaries:
  Node: 16.19.0
  npm: 8.19.3
  Yarn: 1.22.19
  pnpm: N/A
Relevant packages:
  next: 13.4.1-canary.1
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue

https://github.com/QzCurious/nextjs-app-increase-bundle-size-of-pages

To Reproduce

Check the bundle size of pages of a clean next-app

  1. git clone [email protected]:QzCurious/nextjs-app-increase-bundle-size-of-pages.git
  2. cd nextjs-app-increase-bundle-size-of-pages.git
  3. git checkout e73f9f4
  4. yarn
  5. yarn build
  6. check output
    image

Check the bundle size of pages of a next-app with a app/home/page.tsx

  1. git checkout 93a54da
  2. yarn
  3. yarn build
  4. check output

image

Describe the Bug

By just adding a minimal page in app directory, it increase the bundle size of pages.

Expected Behavior

The bundle size of pages should not affected by app directory.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

NEXT-1142

@QzCurious QzCurious added the bug Issue was opened via the bug report template. label May 5, 2023
@zackfencedev
Copy link

I saw a youtube video on this and I believe this is intended behaviour. The benchmark showed despite the increase page size, the page was actually faster. I believe the extra space comes from json being encoded at the bottom of the page instead of being fetched client side.

@timneutkens timneutkens added the linear: next Confirmed issue that is tracked by the Next.js team. label May 10, 2023
@timneutkens timneutkens changed the title app increase bundle size of pages [NEXT-1142] app increase bundle size of pages May 10, 2023
@QzCurious
Copy link
Author

Upgrade to 13.4.5-canary.0 solve the issue.

image

@huozhi
Copy link
Member

huozhi commented May 26, 2023

Thanks for confirming!

@huozhi huozhi closed this as completed May 26, 2023
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team.
Projects
None yet
Development

No branches or pull requests

5 participants
@huozhi @timneutkens @QzCurious @zackfencedev and others