feat: add Vanilla Extract support - #5040
Conversation
🦋 Changeset detectedLatest commit: 11b9ee6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 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 |
|
🤖 Hello there, We just published version Thanks! |
|
🤖 Hello there, We just published version Thanks! |
|
🤖 Hello there, We just published version Thanks! |
small bug in the commenting workflow 🙃 - will be available in the nightly tonight |
|
I've created a React component library and Remix don't work with css files imported from static package bundle. I'm trying the future flags unstable_cssBundle and unstable_vanillaExtract on remix.config. |
Closes: #4708
I ended up writing our own custom esbuild plugin rather than using the official Vanilla Extract one since we want to have lower level control over the esbuild child compilation. This lets us ensure that assets and asset imports are handled the same as the rest of the app. We're still calling out to the
@vanilla-extract/integrationpackage which is the basis of all other bundler plugins, so we're still relying on the official implementation of the core logic.Autoprefixing is not currently supported in this initial release since there's no way to intercept the generated CSS, but will be implemented as part of #5017.
Testing Strategy:
Similar testing strategy to CSS Modules and CSS side-effect imports, using integration tests to compile an app with Vanilla Extract and assert that styles end up on the page correctly. I've also added some Vanilla Extract fixtures to the deterministic build output test.