fix: keep zero-runtime stylesheet modules out of client treeshaking - #305
Conversation
🦋 Changeset detectedLatest commit: ced6867 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe change classifies Merge Risk: ⚪ Minimal · up to This localized change keeps stylesheet modules from being removed during client tree-shaking; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
The client build defaults every module to side-effect free, keeping only
.markofiles, styles, assets, and bare-import subgraphs. A zero-runtime stylesheet module (*.css.ts/*.css.js, as used by vanilla-extract) looks pure — it only exports class name strings — so when nothing in the client bundle references those exports, the module is dropped and its stylesheet is silently never emitted. The page renders unstyled with no build warning.This treats those modules as side-effectful by path, alongside styles and assets.