MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / isVitePrebundle

Function isVitePrebundle

packages/vite/hmr/helpers/ast-normalizer.ts:56–56  ·  view source on GitHub ↗
(src: string | null | undefined)

Source from the content-addressed store, hash-verified

54 const isVueLike = (src: string | null | undefined) => (isVuePackage(src) || isVuePrebundle(src)) && !isSfcPath(src);
55 const isViteVirtual = (src: string | null | undefined) => !!src && (/\/\@id\//.test(src) || /\0/.test(src) || /__x00__/.test(src));
56 const isVitePrebundle = (src: string | null | undefined) => !!src && /node_modules\/\.vite\/deps\//.test(src);
57 const vitePrebundleId = (src: string | null | undefined): string | null => {
58 if (!src) return null;
59 const m = src.match(/\.vite\/deps\/([^?]+?)\.[mc]?js/);

Callers 1

ImportDeclarationFunction · 0.85

Calls 1

testMethod · 0.45

Tested by

no test coverage detected