Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Plan] Performance Improvements #1270

Open
Labels
enhancementNew feature or request
@fuma-nama

Description

@fuma-nama

What problem will this feature address?

Currently the framework is fast, 161 kb client bundle by default. But it's slower due to:

Fumadocs MDX

No on-demand compilation

On development mode, it should be possible to require compiling MDX pages on-demand, instead of pre-compiling all MDX pages. This is not possible, even on Turbopack, an async import likeawait import("./file.mdx") will always triggerfile.mdx to be bundled first.

However, it is how Fumadocs optimize MDX files - by generating a single file to import all other MDX pages:

exportconstdocs=[toRuntimeAsync({"title":"User Guide","description":"The CLI tool that automates setups and installing components."},()=>import("../content/docs/cli/index.mdx")]

Unused Client Component

MDX pages are compiled into server components via custom loader. For each page, there's different client components being referenced, but Next.js adds all client components into client bundle if they are referenced by aimported server component. This means even if the server component isn't rendered, its client components will still be included in client bundle.

This causes the client components referenced in unused MDX pages loaded by client, while it is unnecessary.

Describe the solution you'd like

  • Wait for Turbopack to support on-demand compilation for dynamic imports
  • Wait Next.js to support a kind of option that supports detecting referenced client components in a smarter way

Describe alternatives you've considered

N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp