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

vite: Don't pass through plugins by default, add unstable_pluginFilter option #1537

Merged
merged 4 commits into from
Jan 30, 2025

Conversation

askoufis
Copy link
Contributor

@askoufis askoufis commented Jan 29, 2025

Fixes #1524. Fixes #1506. Fixes #1403. Fixes #1408. Fixes #1454.

Technically also fixes both #1453 and #1519, but they'll get fixed by #1535.

Forwarding plugins through to the compiler tends to cause more issues than it solves. Numerous code changes have already been made to address issues caused by some plugins. E.g. #1308, #1492, #1369, #1300, #1264, and likely others.

Changes in this PR:

  • Plugins are no longer forwarded through by default to the compiler, with the exception of vite-tsconfig-paths as we know it's compatible, and we have tests for it. This is a breaking change, but I don't think it will cause that many breakages, and may in fact fix more issues than it causes.
  • Users can provide a plugin filter via the unstable_pluginFilter option if they need to pass through plugins to the compiler (hopefully the majority of users will not need to do this)

I've chosen not to document unstable_pluginFilter just yet as it is unstable API and may change.

Additionally, the plugin has been renamed to vite-plugin-vanilla-extract as this better aligns with the vite plugin conventions.

Verified

This commit was signed with the committer’s verified signature.
askoufis Adam Skoufis
…lter` option
Copy link

changeset-bot bot commented Jan 29, 2025

🦋 Changeset detected

Latest commit: f0045af

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

This PR includes changesets to release 1 package
Name Type
@vanilla-extract/vite-plugin Major

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

Verified

This commit was signed with the committer’s verified signature.
askoufis Adam Skoufis

Verified

This commit was signed with the committer’s verified signature.
askoufis Adam Skoufis

Verified

This commit was signed with the committer’s verified signature.
askoufis Adam Skoufis
…ct into vite-plugin-filter
@askoufis askoufis merged commit 7810b7c into master Jan 30, 2025
12 checks passed
@askoufis askoufis deleted the vite-plugin-filter branch January 30, 2025 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment