Split tailwind exports into separate entry point - #655
Open
davidr-cy wants to merge 4 commits into
Open
Conversation
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 detectedLatest commit: 11136d6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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-design
|
||||||||||||||||||||||||||||
| Project |
cypress-design
|
| Branch Review |
fix/split-css-tailwind-entrypoint
|
| Run status |
|
| Run duration | 02m 17s |
| Commit |
|
| Committer | David Rowe |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
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.
Contributor
|
bugbot run |
There was a problem hiding this comment.
✅ 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TailwindConfigandTailwindIconExtractorfrom@cypress-design/cssto a new@cypress-design/css/tailwindentry point@cypress-design/cssentry now only exports browser-safe code (colors, icon extractor tools, CSS)tailwindcss→picocolors→tty.isatty()when only consuming colors/constantsMotivation
Consumers using Vite were forced to stub
process.envandttybecause the main entry point re-exported tailwind config utilities that transitively depend on Node.js APIs viapicocolors.Migration
Test plan
@cypress-design/cssbuilds successfully with the newtailwindentry point@cypress-design/cssin Vite without Node.js stubs@cypress-design/css/tailwindNote
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/cssentrypoint by introducing a new@cypress-design/css/tailwindexport forTailwindConfigandTailwindIconExtractor, leaving the root entrypoint browser-safe.Updates the
@cypress-design/cssexport map/types (exports,typesVersions) and Rollup config to build the new entrypoint, and migrates internal docs/configs and therollup-plugin-tailwind-keeppackage to import from@cypress-design/css/tailwindinstead of@cypress-design/css.Reviewed by Cursor Bugbot for commit 11136d6. Bugbot is set up for automated code reviews on this repo. Configure here.