Skip to content

Commit

Permalink
Remove @remix-run/node from Vite's optimizeDeps.include (#9287)
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish committed Apr 24, 2024
1 parent 470bb1c commit c53eb7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/nasty-pandas-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

Remove `@remix-run/node` from Vite plugin's `optimizeDeps.include` list since it was unnecessary and resulted in Vite warnings when not depending on this package.
7 changes: 0 additions & 7 deletions packages/remix-dev/vite/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1089,13 +1089,6 @@ export const remixVitePlugin: RemixVitePlugin = (remixUserConfig = {}) => {
// That means that before Vite pre-bundles dependencies (e.g. first time dev server is run)
// mismatching Remix routers cause `Error: You must render this element inside a <Remix> element`.
"@remix-run/react",

// For some reason, the `vite-dotenv` integration test consistently fails on webkit
// with `504 (Outdated Optimize Dep)` from Vite unless `@remix-run/node` is included
// in `optimizeDeps.include`. 🤷
// This could be caused by how we copy `node_modules/` into integration test fixtures,
// so maybe this will be unnecessary once we switch to pnpm
"@remix-run/node",
],
},
esbuild: {
Expand Down

0 comments on commit c53eb7d

Please sign in to comment.