Skip to content

feat(editor): run CSS processing via tsdown onSuccess hook - #3121

Merged
gabrielmfern merged 4 commits into
feat/ai-oss-editorfrom
cursor/tsdown-css-processing-115e
Mar 26, 2026
Merged

gabrielmfern merged 4 commits into
feat/ai-oss-editorfrom
cursor/tsdown-css-processing-115e

Conversation

@gabrielmfern

@gabrielmfern gabrielmfern commented Mar 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Moves CSS processing into tsdown's onSuccess hook so that it runs automatically after every successful build, including during build:watch.

Problem

Previously, the editor package's CSS processing (scripts/copy-css.ts) was only run as a separate step after tsdown in the build script:

"build": "tsdown && pnpm run build:css"

The build:watch script only ran tsdown --watch without any CSS processing, meaning CSS changes were never picked up during watch mode.

Solution

Added onSuccess: 'tsx scripts/copy-css.ts' to tsdown.config.ts. This tells tsdown to execute the CSS processing script after every successful build — both in regular build and build:watch modes.

The build script was simplified from tsdown && pnpm run build:css to just tsdown, since CSS processing is now handled by tsdown's lifecycle. The standalone build:css script is retained for manual use.

Changes

  • packages/editor/tsdown.config.ts: Added onSuccess option to run CSS copy/processing after each build
  • packages/editor/package.json: Simplified build script to just tsdown

Slack Thread

Open in Web Open in Cursor 

Summary by cubic

Run editor CSS processing via tsdown’s onSuccess hook so styles update after every build, including build:watch. Uses pnpm build:css and simplifies the build script.

  • Refactors
    • Add onSuccess: 'pnpm build:css' in packages/editor/tsdown.config.ts.
    • Change build to tsdown in packages/editor/package.json; keep build:css for manual runs.

Written for commit c08ac64. Summary will update on new commits.

Moves CSS processing from a separate build:css step into tsdown's
onSuccess hook so it runs automatically after every successful build,
including during build:watch. Previously, build:watch only ran tsdown
without the CSS processing step, meaning CSS changes were not picked up.

Co-authored-by: Gabriel Miranda <gabrielmfern@outlook.com>
@changeset-bot

changeset-bot Bot commented Mar 26, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c08ac64

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

@vercel

vercel Bot commented Mar 26, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
react-email Ready Ready Preview, Comment Mar 26, 2026 3:27pm
react-email-demo Ready Ready Preview, Comment Mar 26, 2026 3:27pm

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Mar 26, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@react-email/editor@3121

commit: 9004124

@cursor cursor Bot changed the title feat(editor): Run CSS processing via tsdown onSuccess hook feat(editor): run CSS processing via tsdown onSuccess hook Mar 26, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@gabrielmfern
gabrielmfern requested a review from joaopcm March 26, 2026 14:00
Co-authored-by: Gabriel Miranda <gabrielmfern@outlook.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedhappy-dom@​20.8.3751008896100
Addedflamebearer@​1.1.3891007775100
Addedhast-util-from-html@​2.0.39910010081100
Addedvite@​7.3.1961008299100
Addedfs-extra@​11.3.410010010089100
Addedglob@​13.0.6951009990100
Addedframer-motion@​12.23.2295100100100100

View full report

@gabrielmfern
gabrielmfern merged commit ea332ac into feat/ai-oss-editor Mar 26, 2026
15 checks passed
@gabrielmfern
gabrielmfern deleted the cursor/tsdown-css-processing-115e branch March 26, 2026 20:56
gabrielmfern added a commit that referenced this pull request Mar 30, 2026
Co-authored-by: Cursor Agent <cursoragent@cursor.com>

This branch was successfully deployed

2 active deployments
Preview – react-email-demo — c08ac647 Deployed Mar 26, 2026 by vercel[bot]
Preview – react-email — c08ac647 Deployed Mar 26, 2026 by vercel[bot]
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