Skip to content

Commit 819a425

Browse files
committed
changeset
1 parent c702cbd commit 819a425

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

‎.changeset/green-baboons-punch.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
"@remix-run/dev": patch
3+
---
4+
5+
Vite: rely on Vite plugin ordering
6+
7+
**This is a breaking change for projects using the unstable Vite plugin.**
8+
9+
The Remix plugin expects to process JavaScript or TypeScript files, so any transpilation from other languages must be done first.
10+
For example, that means putting the MDX plugin _before_ the Remix plugin:
11+
12+
```diff
13+
import mdx from "@mdx-js/rollup";
14+
import { unstable_vitePlugin as remix } from "@remix-run/dev";
15+
import { defineConfig } from "vite";
16+
17+
export default defineConfig({
18+
plugins: [
19+
+ mdx(),
20+
remix()
21+
- mdx(),
22+
],
23+
});
24+
```
25+
26+
Previously, the Remix plugin abused `enforce: "post"` from Vite's plugin API to ensure that it ran last.
27+
However, this caused other unforeseen issues.
28+
Instead, we now rely on standard Vite semantics for plugin ordering.

0 commit comments

Comments
 (0)