MCPcopy
hub / github.com/vitejs/vite / findPreloadMarker

Function findPreloadMarker

packages/vite/src/node/plugins/importAnalysisBuild.ts:42–46  ·  view source on GitHub ↗
(str: string, pos: number = 0)

Source from the content-addressed store, hash-verified

40}
41
42function findPreloadMarker(str: string, pos: number = 0): number {
43 preloadMarkerRE.lastIndex = pos
44 const result = preloadMarkerRE.exec(str)
45 return result?.index ?? -1
46}
47
48/**
49 * Helper for preloading CSS and direct imports of async chunks in parallel to

Callers 1

generateBundleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected