Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/vite-plugin-react-router.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@vanilla-extract/vite-plugin': patch
---

Don't pass React-Router Vite plugin to the vite-node compiler


React-Router throws an error if it's loaded without a config file, which is what we do when we initialise 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 @@ -40,7 +40,10 @@ const removeIncompatiblePlugins = (plugin: PluginOption) =>
// 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');
!plugin.name.startsWith('remix') &&
// As React-Router plugin works the same as Remix plugin, also ignore it.
!plugin.name.startsWith('react-router');


interface Options {
identifiers?: IdentifierOption;
Expand Down