(uri: string)
| 101 | * @internal |
| 102 | */ |
| 103 | export function partialEncodeURIPath(uri: string): string { |
| 104 | if (uri.startsWith('data:')) { |
| 105 | return uri; |
| 106 | } |
| 107 | const filePath = cleanUrl(uri); |
| 108 | const postfix = filePath !== uri ? uri.slice(filePath.length) : ''; |
| 109 | return filePath.replaceAll('%', '%25') + postfix; |
| 110 | } |
| 111 | |
| 112 | // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/utils.ts#L1424 |
| 113 | /** |
no test coverage detected