A Next.js game route reportedly sent about 2.6 MB of JavaScript on its first load—even though a player needed only one of 165 games. Daniel Pertu traced the issue to where the game registry sat in the Server/Client Component module graph, not to a general failure of next/dynamic. His proposed fix was to move game selection into a small Client Component and pass it the chosen game ID from the server.
What went wrong in this app
Pertu describes a practice site with 165 playable games, each implemented as a React component with its own engine and state; some games use canvas. A registry mapped each game ID to a next/dynamic import. Yet the /games/<id> route reportedly had a first load of about 2.6 MB of JavaScript. These are figures from Pertu’s account of one application, not a controlled benchmark or a general measure of Next.js performance. Read Pertu’s account on DEV Community.
As an Amazon Associate I earn from qualifying purchases.
His diagnosis was that the registry had no 'use client' directive and was imported by a Server Component page. Because the registry performed runtime selection among the client game components, Pertu says the build did not preserve the per-game isolation he expected from the dynamic imports. That explains his app as he reported it; it is not a universal rule for every Next.js version, bundler, or module graph.
Why the client boundary matters
In Next.js, 'use client' marks a client entry point and establishes a boundary between the server and client module graphs. It belongs on files that serve as entry points rendered directly from Server Components; it does not need to be repeated in every component file. Modules imported beneath a client entry point become part of the client bundle, so an unnecessarily broad boundary can bring more code into that bundle. The directive is therefore about which graph a module belongs to—not simply whether a file contains React components. Next.js: 'use client' and Next.js: Server and Client Components.
#1 Best Overall
- Experience your Favorite MARVEL vs. CAPCOM classics All in One – Enjoy 7 of your favorite classic titles that helped shaped the MARVEL vs. CAPCOM universe both single player and online.
- Enjoy Enhanced Features Added to the Classic Collection – To enhance your playability experience, we incorporated the favorite added features from Capcom Fighting Collection including gallery mode, quick save, training mode for all fighting titles, and the high score challenge. Beginners and first timers into the franchise are also welcome to play through adjusted settings and execution of one-button specials!
- Play with Friends Worldwide through Online Compatibility – This collection also includes rollback net code for a smooth and enjoyable experience online. Play casually or competitively through casual, ranked, or custom matches using rules of your choosing!
next/dynamic can lazy-load Client Components and imported libraries, helping reduce the JavaScript needed for a route. But it is a loading mechanism, not a guarantee that any runtime registry will produce one isolated chunk per possible choice. The result depends on the actual module graph and build, so verify what the production app emits and requests. Next.js: Lazy Loading.
The proposed fix: let the client resolve the game
Pertu’s change moves the registry into the client module graph by adding 'use client', then puts the dynamic lookup in a small GameRunner Client Component that accepts a game ID. The Server Component page can still resolve the requested game, perform access and play-budget checks, and create metadata before rendering GameRunner. The client uses the ID to select and load the interactive game implementation.
Rank #2
- The following games are included in the cartridge: STAR WARS Jedi Knight: Jedi Academy (3.6 GB)
- STAR WARS Jedi Knight II: Jedi Outcast (1.1 GB)
- STAR WARS Episode I Racer (254 MB)
- STAR WARS Republic Commando (2.5 GB)
- STAR WARS: The Force Unleashed (3.4 GB)
This division keeps server responsibilities on the server while moving client-side component resolution to the client. A Server Component cannot call a lookup function from a client-side registry as though that registry were server code: as Pertu puts it, “A Server Component can no longer call getGameComponent. Pass the game id to GameRunner instead.” The ID passed as a prop must be serializable, as required when passing props across the Server/Client Component boundary. The precise split should match the app’s data and security model.
Free tools Windows power users keep installed
One-click scans. No signup required.
A short code comment can preserve the reason for the design: server callers pass an ID rather than importing a component from the client-side registry. That makes the boundary intentional and helps prevent a later refactor from putting lookup in the wrong graph.
Rank #3
- The games that inspired a generation come to life once more, in the ultimate 2D pixel remaster!
- These games are newly developed remaster editions based on the original titles. Some of the changes and additional elements found in other remakes of these games are not included.
- The Anniversary Edition includes a pixel character sticker sheet.
- Universally updated 2D pixel graphics, including the iconic FINAL FANTASY character designs created by Kazuko Shibuya, the original artist and current collaborator.
- Beautifully rearranged soundtrack in a faithful FINAL FANTASY style, overseen by original composer Nobuo Uematsu.
How to check whether a route is loading too much
- Build for production. Run
next buildand inspect the route information and bundle measurements available in your build output or configured bundle analyzer. Next.js documents this command as producing an optimized production build with route information. Output columns and available tooling can differ by release and build mode, so compare like with like. Next.js CLI:next. - Inspect browser requests. Load the affected route and use the browser’s Network panel to review JavaScript requests. For a registry intended to load one game on demand, check whether the route loads its own chunks first and whether the selected game’s chunk is requested when the runner mounts. Pertu describes this check for his site; it is not an independently verified test of the site here.
- Compare the payload with the route’s needs. Look at the requested files and their sizes in the context of the feature being used. A size increase after an unrelated feature is added can be a useful clue, but it does not by itself prove a client-boundary problem.
What this incident does—and does not—show
- It shows how the placement of a client entry point can affect whether a runtime-selectable component registry is included and loaded as intended.
- It does not establish that
next/dynamicis ineffective. Next.js documents it as a way to lazy-load Client Components and imported libraries; the output still needs to be checked in the specific production build. - The reported 165 games and roughly 2.6 MB first load are specific to Pertu’s app and account. The article provides no measured post-fix size, percentage improvement, or independent benchmark.
Pertu’s summary is apt for this case: “next/dynamic is not a promise, it is a request.” The practical lesson is to make the server/client boundary match the work each side should do—and confirm the result in the built application.
Quick Recap
Rank #4
- The Mega Man Star Force Legacy Collection includes Mega Man Star Force Pegasus, Mega Man Star Force Leo, Mega Man Star Force Dragon, Mega Man Star Force 2 Zerker x Ninja, Mega Man Star Force 2 Zerker x Saurian, Mega Man Star Force 3 Black Ace & Mega Man Star Force 3 Red Joker.
- Browse over 1,000 pieces of official artwork, including rare concept illustrations. You can also rock out to music from all three Mega Man Star Force titles plus newly arranged tracks, with select tracks that can be set as in-game background music.
- Customize gameplay by increasing your Mega Buster power, adjusting encounter rates, and playing through Casual for easy play or Ranked Matches for global competition.
- Optional high-resolution filters allow you to enjoy smoother visuals or toggle them off at any time to experience the classic look.
- Rare bonus cards previously obtainable only through events or merchandise are included. You can also combine them with cards earned during gameplay to build even more powerful decks (some bonus cards are not included).
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




