We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9b92f5 commit 68d500eCopy full SHA for 68d500e
packages/vite/src/node/utils.ts
@@ -256,10 +256,11 @@ export function ensureVolumeInPath(file: string): string {
256
}
257
258
export const queryRE = /\?.*$/s
259
-export const hashRE = /#.*$/s
260
261
-export const cleanUrl = (url: string): string =>
262
- url.replace(hashRE, '').replace(queryRE, '')
+const postfixRE = /[?#].*$/s
+export function cleanUrl(url: string): string {
+ return url.replace(postfixRE, '')
263
+}
264
265
export const externalRE = /^(https?:)?\/\//
266
export const isExternalUrl = (url: string): boolean => externalRE.test(url)
0 commit comments