-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(remix-dev/vite): make
installGlobals
opt-in for Vite dev (#8119)
Co-authored-by: Mark Dalgleish <[email protected]>
- Loading branch information
1 parent
c043a66
commit a95e5fb
Showing
4 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
"@remix-run/dev": patch | ||
--- | ||
|
||
Remove automatic global Node polyfill installation from the built-in Vite dev server and instead allow explicit opt-in. | ||
|
||
**This is a breaking change for projects using the unstable Vite plugin without a custom server.** | ||
|
||
If you're not using a custom server, you should call `installGlobals` in your Vite config instead. | ||
|
||
```diff | ||
import { unstable_vitePlugin as remix } from "@remix-run/dev"; | ||
+import { installGlobals } from "@remix-run/node"; | ||
import { defineConfig } from "vite"; | ||
|
||
+installGlobals(); | ||
|
||
export default defineConfig({ | ||
plugins: [remix()], | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import { unstable_vitePlugin as remix } from "@remix-run/dev"; | ||
import { installGlobals } from "@remix-run/node"; | ||
import { defineConfig } from "vite"; | ||
import tsconfigPaths from "vite-tsconfig-paths"; | ||
|
||
installGlobals(); | ||
|
||
export default defineConfig({ | ||
plugins: [remix(), tsconfigPaths()], | ||
}); |