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

Function extractVitePrebundleId

packages/vite/hmr/server/websocket.ts:84–90  ·  view source on GitHub ↗
(spec: string)

Source from the content-addressed store, hash-verified

82
83// Minimal helpers to support vendor pre-bundle detection
84function extractVitePrebundleId(spec: string): string | null {
85 const m = spec.match(/\.vite\/deps\/([^?]+?)\.[mc]?js/);
86 if (m) return m[1];
87 const m2 = spec.match(/__x00__([^?]+?)\.[mc]?js/);
88 if (m2) return m2[1];
89 return null;
90}
91
92function getFlattenedManifestMap(manifest: VendorManifest): Map<string, string> {
93 const map = new Map<string, string>();

Callers 1

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected