diff --git a/src/webpack/utils.ts b/src/webpack/utils.ts index 3295f93c..16dec5d9 100644 --- a/src/webpack/utils.ts +++ b/src/webpack/utils.ts @@ -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) }