Skip to content

Commit

Permalink
Filter all Remix vite plugins before passing to vite-node (#1369)
Browse files Browse the repository at this point in the history
  • Loading branch information
askoufis authored Mar 28, 2024
1 parent ed67731 commit 05ef2f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/hip-zebras-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vanilla-extract/vite-plugin': patch
---

Fixes a bug where an internal Remix plugin would throw an error inside the `vite-node` compiler
5 changes: 4 additions & 1 deletion packages/vite-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ export function vanillaExtractPlugin({
// If it _is_ loaded with a config file, it will create an infinite loop because it
// also has a child compiler which uses the same mechanism to load the config file.
// https://github.com/remix-run/remix/pull/7990#issuecomment-1809356626
plugin.name !== 'remix',
// Additionally, some internal Remix plugins rely on a `ctx` object to be initialized by
// the main Remix plugin, and may not function correctly without it. To address this, we
// filter out all Remix-related plugins.
!plugin.name.startsWith('remix'),
),
},
});
Expand Down

0 comments on commit 05ef2f0

Please sign in to comment.