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

Function isVuePrebundle

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

Source from the content-addressed store, hash-verified

50 const isCoreLike = (src: string | null | undefined) => !!src && /(?:https?:\/\/[^"']+)?\/ns\/core(?:\/[\d]+)?(?:\?p=[^"']+)?$/.test(src);
51 const isSfcPath = (src: string | null | undefined) => !!src && /\.vue(?:\?|$)/.test(src);
52 const isVuePrebundle = (src: string | null | undefined) => !!src && /\.vite\/deps\/(?:vue|nativescript-vue)[^/]*\.js/.test(src);
53 const isVuePackage = (src: string | null | undefined) => !!src && (src === 'vue' || src.startsWith('vue/') || src.includes('nativescript-vue'));
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));

Callers 2

isVueLikeFunction · 0.85
ImportDeclarationFunction · 0.85

Calls 1

testMethod · 0.45

Tested by

no test coverage detected