Skip to content

Commit

Permalink
fix: windows path normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 12, 2024
1 parent 2785373 commit 233356c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function createTwoSlasher(createOptions: CreateTwoSlashOptions = {}): Two

// In a browser we want to DI everything, in node we can use local infra
const useFS = !!createOptions.fsMap
const _root = createOptions.vfsRoot!.replace(/\//g, '/') // Normalize slashes
const _root = createOptions.vfsRoot!.replace(/\\/g, '/') // Normalize slashes
const vfs = useFS && createOptions.fsMap ? createOptions.fsMap : new Map<string, string>()
const system = useFS ? createSystem(vfs) : createFSBackedSystem(vfs, _root, ts, createOptions.tsLibDirectory)
const fsRoot = useFS ? '/' : `${_root}/`
Expand Down

0 comments on commit 233356c

Please sign in to comment.