Skip to content

Commit

Permalink
Filter out all Remix plugins from the vite-node plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
askoufis committed Mar 23, 2024
1 parent ccb4957 commit c796ced
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 c796ced

Please sign in to comment.