Skip to content

Commit ed7bdc5

Browse files
authored
feat: scan .marko files (#14669)
1 parent 45595ef commit ed7bdc5

File tree

1 file changed

+7
-1
lines changed
  • packages/vite/src/node/optimizer

1 file changed

+7
-1
lines changed

packages/vite/src/node/optimizer/scan.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,13 @@ function shouldExternalizeDep(resolvedId: string, rawId: string): boolean {
661661
}
662662

663663
function isScannable(id: string): boolean {
664-
return JS_TYPES_RE.test(id) || htmlTypesRE.test(id)
664+
// From Vite 5, all optimizeDeps.extensions are scannable. We hardcode .marko for 4.5.0 to avoid
665+
// potential regressions. See https://github.com/vitejs/vite/pull/14543
666+
return (
667+
JS_TYPES_RE.test(id) ||
668+
htmlTypesRE.test(id) ||
669+
path.extname(id) === '.marko'
670+
)
665671
}
666672

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy