Skip to content

Split tailwind exports into separate entry point - #655

Open
davidr-cy wants to merge 4 commits into
mainfrom
fix/split-css-tailwind-entrypoint
Open

Split tailwind exports into separate entry point#655
davidr-cy wants to merge 4 commits into
mainfrom
fix/split-css-tailwind-entrypoint

Conversation

@davidr-cy

@davidr-cy davidr-cy commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Moves TailwindConfig and TailwindIconExtractor from @cypress-design/css to a new @cypress-design/css/tailwind entry point
  • The main @cypress-design/css entry now only exports browser-safe code (colors, icon extractor tools, CSS)
  • Prevents Vite and other browser bundlers from pulling in tailwindcsspicocolorstty.isatty() when only consuming colors/constants

Motivation

Consumers using Vite were forced to stub process.env and tty because the main entry point re-exported tailwind config utilities that transitively depend on Node.js APIs via picocolors.

Migration

- const { TailwindConfig } = require('@cypress-design/css')
+ const { TailwindConfig } = require('@cypress-design/css/tailwind')

Test plan

  • Verify @cypress-design/css builds successfully with the new tailwind entry point
  • Verify consuming projects can import @cypress-design/css in Vite without Node.js stubs
  • Verify tailwind configs still work when importing from @cypress-design/css/tailwind

Note

Medium Risk
Major breaking change for consumers importing TailwindConfig/TailwindIconExtractor, plus packaging/export-map adjustments that could impact builds if misconfigured.

Overview
Splits Node/Tailwind-specific utilities out of the main @cypress-design/css entrypoint by introducing a new @cypress-design/css/tailwind export for TailwindConfig and TailwindIconExtractor, leaving the root entrypoint browser-safe.

Updates the @cypress-design/css export map/types (exports, typesVersions) and Rollup config to build the new entrypoint, and migrates internal docs/configs and the rollup-plugin-tailwind-keep package to import from @cypress-design/css/tailwind instead of @cypress-design/css.

Reviewed by Cursor Bugbot for commit 11136d6. Bugbot is set up for automated code reviews on this repo. Configure here.

Move TailwindConfig and TailwindIconExtractor from the main
@cypress-design/css entry point to @cypress-design/css/tailwind.
This prevents browser bundlers like Vite from pulling in tailwindcss
(and its picocolors dependency that calls tty.isatty()) when consumers
only need colors and constants.
@changeset-bot

changeset-bot Bot commented Mar 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 11136d6

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

This PR includes changesets to release 2 packages
Name Type
@cypress-design/css Major
@cypress-design/rollup-plugin-tailwind-keep Patch

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

vercel Bot commented Mar 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
cypress-design Ready Ready Preview Mar 30, 2026 3:50am

Request Review

Comment thread .changeset/split-tailwind-entrypoint.md Outdated
The rollup-plugin-tailwind-keep package uses a moduleResolution setting
that doesn't resolve package.json exports for types. Adding typesVersions
provides a fallback path for TypeScript to find the tailwind entry types.
@cypress

cypress Bot commented Mar 30, 2026

Copy link
Copy Markdown

cypress-design    Run #3430

Run Properties:  status check passed Passed #3430  •  git commit aba0c05d78 ℹ️: Merge 11136d662942ad122f090f4dcca35fa2f2c7e30c into d2cf10fb4bd2160503c26f4feabd...
Project cypress-design
Branch Review fix/split-css-tailwind-entrypoint
Run status status check passed Passed #3430
Run duration 02m 17s
Commit git commit aba0c05d78 ℹ️: Merge 11136d662942ad122f090f4dcca35fa2f2c7e30c into d2cf10fb4bd2160503c26f4feabd...
Committer David Rowe
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 2
View all changes introduced in this branch ↗︎

Warning

No Report: Something went wrong and we could not generate a report for the Application Quality products.

@emilmilanov

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 11136d6. Configure here.

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.

2 participants