File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments