( code: string, start: number, exportNames: Set<string>, )
| 1102 | } |
| 1103 | |
| 1104 | export function lexAcceptedHmrExports( |
| 1105 | code: string, |
| 1106 | start: number, |
| 1107 | exportNames: Set<string>, |
| 1108 | ): boolean { |
| 1109 | const urls = new Set<{ url: string; start: number; end: number }>() |
| 1110 | lexAcceptedHmrDeps(code, start, urls) |
| 1111 | for (const { url } of urls) { |
| 1112 | exportNames.add(url) |
| 1113 | } |
| 1114 | return urls.size > 0 |
| 1115 | } |
| 1116 | |
| 1117 | export function normalizeHmrUrl(url: string): string { |
| 1118 | if (url[0] !== '.' && url[0] !== '/') { |
no test coverage detected