Skip to content

Commit

Permalink
feat: scan .marko files (#14669)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Oct 18, 2023
1 parent 45595ef commit ed7bdc5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/vite/src/node/optimizer/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,13 @@ function shouldExternalizeDep(resolvedId: string, rawId: string): boolean {
}

function isScannable(id: string): boolean {
return JS_TYPES_RE.test(id) || htmlTypesRE.test(id)
// From Vite 5, all optimizeDeps.extensions are scannable. We hardcode .marko for 4.5.0 to avoid
// potential regressions. See https://github.com/vitejs/vite/pull/14543
return (
JS_TYPES_RE.test(id) ||
htmlTypesRE.test(id) ||
path.extname(id) === '.marko'
)
}

// esbuild v0.18 only transforms decorators when `experimentalDecorators` is set to `true`.
Expand Down

0 comments on commit ed7bdc5

Please sign in to comment.