Skip to content

Commit

Permalink
refactor: regex for cleanUrl (vitejs#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
sharvilak11 committed May 28, 2020
1 parent 482bd34 commit 8e41db2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/utils/pathUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const resolveFrom = (root: string, id: string) =>
resolve.sync(id, { basedir: root, extensions: supportedExts })

export const queryRE = /\?.*$/
export const hashRE = /\#.*$/
export const hashRE = /#.*$/

export const cleanUrl = (url: string) =>
url.replace(hashRE, '').replace(queryRE, '')
Expand Down

0 comments on commit 8e41db2

Please sign in to comment.