Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove @remix-run/node from Vite's optimizeDeps.include #9287

Merged
merged 2 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Remove @remix-run/node from optimizeDeps.include
  • Loading branch information
markdalgleish committed Apr 23, 2024
commit 58ef921bcc497de5131d1c36bbb510ba8fbac006
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