Skip to content

Conversation

@jacekradko
Copy link
Member

@jacekradko jacekradko commented Jan 17, 2026

Summary

  • Add @rsdoctor/rspack-plugin for build analysis (matching clerk-js setup)
  • Add build:rsdoctor script for convenient rsdoctor usage
  • Fix build:analyze to only build single variant (avoids port conflict when running bundle analyzer)
  • Support RSDOCTOR=true/brief env var for analysis mode

Fixes: USER-4303
Fixes: USER-4304
Fixes: USER-4305

Usage

# Webpack Bundle Analyzer (opens interactive UI at http://127.0.0.1:8888)
pnpm build:analyze

# Rsdoctor full analysis (opens interactive UI)
pnpm build:rsdoctor
# or
RSDOCTOR=true pnpm build:umd

# Rsdoctor brief mode (no server, outputs to console)
RSDOCTOR=brief pnpm build:umd

Test plan

  • Verified pnpm build:analyze works and opens bundle analyzer
  • Verified pnpm build:rsdoctor works and opens rsdoctor UI
  • Verified RSDOCTOR=brief pnpm build:umd outputs analysis to console
  • Verified regular pnpm build:umd still works without rsdoctor

Summary by CodeRabbit

  • Chores
    • Enhanced build analysis tooling and profiling support.
    • Added a dedicated build analysis command for deeper diagnostics.
    • Updated build configuration to support an analysis mode flag.
    • Added tooling integration for advanced build graph/diagnostics.
    • Added a lightweight changelog entry file for release tracking.

✏️ Tip: You can customize this high-level summary in your review settings.

- Add @rsdoctor/rspack-plugin for build analysis
- Add build:rsdoctor script for convenient rsdoctor usage
- Fix build:analyze to only build single variant (avoids port conflict)
- Support RSDOCTOR=true/brief env var for analysis mode
@changeset-bot
Copy link

changeset-bot bot commented Jan 17, 2026

🦋 Changeset detected

Latest commit: 19296c4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

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

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link

vercel bot commented Jan 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jan 17, 2026 1:29pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 17, 2026

📝 Walkthrough

Walkthrough

The UI package was updated to add a dev dependency for the Rsdoctor rspack plugin, introduce two build scripts (build:analyze with an --env analyze flag and build:rsdoctor that sets RSDOCTOR), and modify the rspack configuration to conditionally instantiate the Rsdoctor plugin when RSDOCTOR is set. The production config function signature changed to ({ mode, analysis }), the export now derives analysis from env.analyze, and prodConfig returns early when analysis is true.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding rsdoctor support and fixing build:analyze, matching the core objectives.
Linked Issues check ✅ Passed The PR fully addresses linked issues USER-4303/4304 by fixing build:analyze for single variant builds, and USER-4305 by implementing rsdoctor support with RSDOCTOR environment variable.
Out of Scope Changes check ✅ Passed All changes are scoped to the stated objectives: updating package.json, rspack.config.js, and adding a changeset entry with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 17, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7616

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7616

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7616

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7616

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7616

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7616

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@7616

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7616

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7616

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7616

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7616

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7616

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7616

@clerk/react

npm i https://pkg.pr.new/@clerk/react@7616

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7616

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7616

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7616

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7616

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7616

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7616

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7616

commit: 8b0d482

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants