Skip to content

chore(www): reduce buildtime#4789

Open
Barsnes wants to merge 7 commits intomainfrom
www/buildtime
Open

chore(www): reduce buildtime#4789
Barsnes wants to merge 7 commits intomainfrom
www/buildtime

Conversation

@Barsnes
Copy link
Copy Markdown
Member

@Barsnes Barsnes commented Apr 24, 2026

Summary

Checks

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 24, 2026

⚠️ No Changeset found

Latest commit: 4b4fe8d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Preview deployments for this pull request:

www - 27. Apr 2026 - 08:01

@Barsnes Barsnes requested a review from Copilot April 27, 2026 05:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets faster apps/www build/prerender times by increasing prerender parallelism and avoiding repeated expensive parsing/compilation work during route loading.

Changes:

  • Increased React Router prerender concurrency.
  • Avoided full MDX compilation on the home page by extracting blog frontmatter directly.
  • Added several process-wide caches for MDX compilation, component prop extraction, story extraction, and component CSS parsing.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
apps/www/react-router.config.ts Increases prerender concurrency to speed up builds.
apps/www/app/routes/home/home.tsx Replaces bundleMDX usage with a lightweight frontmatter extraction for blog cards.
apps/www/app/routes/components/component.tsx Adds caching for resolving/reading/parsing component CSS.
apps/www/app/_utils/get-react-props.server.ts Reuses a single react-docgen-typescript parser and caches component docs.
apps/www/app/_utils/generate-from-mdx.ts Caches MDX compilation results to avoid recompiling identical sources.
apps/www/app/_utils/extract-stories.server.ts Caches story extraction results per component path + variant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/www/app/routes/home/home.tsx Outdated
Comment thread apps/www/app/_utils/generate-from-mdx.ts
Comment thread apps/www/app/_utils/extract-stories.server.ts
Comment thread apps/www/app/_utils/get-react-props.server.ts
Comment thread apps/www/app/routes/components/component.tsx Outdated
Co-authored-by: Copilot <copilot@github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/www/app/_utils/generate-from-mdx.ts Outdated
Comment thread apps/www/app/routes/components/component.tsx
Comment thread apps/www/app/routes/components/component.tsx Outdated
Barsnes and others added 2 commits April 27, 2026 07:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Barsnes Barsnes marked this pull request as ready for review April 27, 2026 05:56
{
code: string;
// biome-ignore lint/suspicious/noExplicitAny: this is how frontmatter is typed in mdx-bundler
frontmatter: { [key: string]: any };
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use unknown here instead of any?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how it's typed in frontmatter, but I guess we could do unkown - should make no difference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants