Skip to content

Commit

Permalink
vite: fix server exports elimination for routes outside of app dir
Browse files Browse the repository at this point in the history
Co-authored-by: Luciano Fantone <luciano.alvarezfantone@sas.se>
  • Loading branch information
pcattori and lfantone committed Feb 19, 2024
1 parent 367771c commit 7a98d9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/brave-yaks-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

Vite: fix server exports dead-code elimination for routes outside of app directory
1 change: 0 additions & 1 deletion packages/remix-dev/vite/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,6 @@ function getRoute(
file: string
): ConfigRoute | undefined {
let vite = importViteEsmSync();
if (!file.startsWith(vite.normalizePath(pluginConfig.appDirectory))) return;
let routePath = vite.normalizePath(
path.relative(pluginConfig.appDirectory, file)
);
Expand Down

0 comments on commit 7a98d9f

Please sign in to comment.