Skip to content

Commit

Permalink
chore: try fix windows
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 24, 2022
1 parent 04ab349 commit ed8a727
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function createContext(options: Options = {}, root = process.cwd()) {
return unimport.generateTypeDecarations({
resolvePath: (i) => {
if (i.from.startsWith('.') || i.from.startsWith('/')) {
const related = posix.relative(dir, slash(i.from)).replace(/\.ts$/, '')
const related = slash(relative(dir, slash(i.from)).replace(/\.ts$/, ''))
return !related.startsWith('.')
? `./${related}`
: related
Expand Down

0 comments on commit ed8a727

Please sign in to comment.