Skip to content

Commit

Permalink
fix(webpack): use path separator instead backslash (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed May 7, 2022
1 parent 6e419d1 commit b827bed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/webpack/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { sep } from 'path'

export function slash (path: string) {
return path.replace(/\\/g, '/')
}

export function backSlash (path: string) {
return path.replace(/\//g, '\\')
return path.replace(/[\\/]/g, sep)
}

0 comments on commit b827bed

Please sign in to comment.