diff --git a/.changeset/nasty-pandas-accept.md b/.changeset/nasty-pandas-accept.md new file mode 100644 index 00000000000..ddae17ecf52 --- /dev/null +++ b/.changeset/nasty-pandas-accept.md @@ -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. diff --git a/packages/remix-dev/vite/plugin.ts b/packages/remix-dev/vite/plugin.ts index b5c0e7b2ad3..927322d97c0 100644 --- a/packages/remix-dev/vite/plugin.ts +++ b/packages/remix-dev/vite/plugin.ts @@ -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 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: {