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

Function isVueLike

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

Source from the content-addressed store, hash-verified

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));
56 const isVitePrebundle = (src: string | null | undefined) => !!src && /node_modules\/\.vite\/deps\//.test(src);
57 const vitePrebundleId = (src: string | null | undefined): string | null => {

Callers 3

ImportDeclarationFunction · 0.85
ImportExpressionFunction · 0.85
CallExpressionFunction · 0.85

Calls 3

isVuePackageFunction · 0.85
isVuePrebundleFunction · 0.85
isSfcPathFunction · 0.85

Tested by

no test coverage detected