Skip to content

Commit c3f2ad7

Browse files
committed
fix: use correct routes dir for optimizeDeps entries glob
1 parent 3d664ec commit c3f2ad7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/loose-wombats-stare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@marko/run": patch
3+
---
4+
5+
Use correct routes directory for optimizeDep entries glob

packages/run/src/vite/plugin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,10 @@ export default function markoRun(opts: Options = {}): Plugin[] {
437437
pluginConfig.optimizeDeps ??= {};
438438
if (!config.optimizeDeps?.entries) {
439439
pluginConfig.optimizeDeps.entries = [
440-
"src/pages/**/*+{page,layout}.marko",
440+
`${normalizePath(path.relative(root, routesDir))}/**/*+{page,layout}.marko`,
441441
"!**/__snapshots__/**",
442-
`!**/__tests__/**`,
443-
`!**/coverage/**`,
442+
"!**/__tests__/**",
443+
"!**/coverage/**",
444444
];
445445
}
446446

0 commit comments

Comments
 (0)