-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restrict VanillaExtract plugin to playroom's source .css.ts
files only
#377
Restrict VanillaExtract plugin to playroom's source .css.ts
files only
#377
Conversation
🦋 Changeset detectedLatest commit: f48d80d 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 |
@askoufis I have one more here :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've never had any issues using playroom alongside a library that contains .css.ts
files. However, this change seems sensible regardless of that fact. Thanks.
Problem
Playroom uses
VanillaExtract
to extract and process CSS files, specifically.css.ts
files. While the webpack loader rule correctly limits the scope of this loader on playroom's own source code, the plugin itself isn't scoped, and as such, it sends up processing every single.css.[t|j]s
file it can find, including those from the consumer's codebase,node_modules
, etc..This problematic, and leads to a whole range of issues, making Playroom unusable if your UI Library has
.css.[j|t]s
files, or even if one of your dependencies has it.Solution
Correctly scope the plugin to Playroom's own
.css.ts
files only.