Skip to content
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

feat: add Vanilla Extract support #5040

Merged
merged 14 commits into from
Jan 10, 2023
Merged

Conversation

markdalgleish
Copy link
Member

@markdalgleish markdalgleish commented Jan 9, 2023

Closes: #4708

  • Docs
  • Tests

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/integration package 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.

@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2023

🦋 Changeset detected

Latest commit: 11b9ee6

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

This PR includes changesets to release 18 packages
Name Type
@remix-run/dev Minor
@remix-run/react Minor
@remix-run/server-runtime Minor
@remix-run/testing Minor
@remix-run/css-bundle Minor
create-remix Minor
@remix-run/cloudflare Minor
@remix-run/deno Minor
@remix-run/node Minor
@remix-run/cloudflare-pages Minor
@remix-run/cloudflare-workers Minor
@remix-run/architect Minor
@remix-run/express Minor
@remix-run/netlify Minor
@remix-run/vercel Minor
@remix-run/serve Minor
remix Minor
@remix-run/eslint-config Minor

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

Copy link
Collaborator

@chaance chaance left a comment

Choose a reason for hiding this comment

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

Looks good! Just a question but nothing blocking IMO 👍

@markdalgleish markdalgleish merged commit 05ffb6e into dev Jan 10, 2023
@markdalgleish markdalgleish deleted the markdalgleish/vanilla-extract branch January 10, 2023 23:38
@github-actions github-actions bot added the awaiting release This issue has been fixed and will be released soon label Jan 10, 2023
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-f5475db-20230111 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions github-actions bot removed the awaiting release This issue has been fixed and will be released soon label Jan 11, 2023
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.10.1-pre.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.10.1 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@mcansh
Copy link
Collaborator

mcansh commented Jan 13, 2023

🤖 Hello there,

We just published version 1.10.1 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

small bug in the commenting workflow 🙃 - will be available in the nightly tonight

@AdsonCicilioti
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants