vercel-labs / vercel-labs/json-render

Question: Concern regarding componentRegistry scaling and impact on client bundle size

Open
#49 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
16.8k
Forks
901
Avg merge
3h 14m
Merged PRs (30d)
4

Description

Hi everyone,

I've been using the library and it's been working great so far. However, I have a concern regarding performance as my project scales.

Currently, I am declaring all my components and storing them in a single large object (componentRegistry). As my design system grows, this object is becoming quite large. I'm worried that including this entire registry will negatively impact the client-side bundle size, even for pages that don't use every component.

Are there recommended patterns for lazy loading or splitting this registry to avoid shipping unused components to the client?

Thanks for your help!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how the componentRegistry is declared and consumed, then inspect the library's client-side bundling and component-loading entry points. Determine whether the project documents or tests lazy loading or registry splitting; done would mean an agreed approach that avoids shipping unused components without breaking registry usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.