Skip to content

Commit

Permalink
fix: localesPaths backslash for Windows, close #477
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 9, 2021
1 parent 0cdd03c commit 7ab8269
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/core/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,11 @@ export class Config {
localesPaths = paths.split(',')
else
localesPaths = paths || []
return localesPaths.map(i => trimEnd(i, '/\\'))
return localesPaths.map(i => trimEnd(i, '/\\').replace(/\\/g, '/'))
}

static set _localesPaths(paths: string[]) {
if (paths.length === 1)
this.setConfig('localesPaths', paths[0])
else
this.setConfig('localesPaths', paths)
this.setConfig('localesPaths', paths)
}

static updateLocalesPaths(paths: string[]) {
Expand Down

0 comments on commit 7ab8269

Please sign in to comment.