Skip to content

Commit 124354c

Browse files
committed
Fix automatic declaration file resolution on Windows
Ref: #2416 (more to do here)
1 parent deae36a commit 124354c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### Bug Fixes
44

5+
- Fixed automatic declaration file resolution on Windows, #2416.
56
- Fixed default option values on options declared by plugins in packages mode, #2433.
67
- `gitRevision` will now be replaced in `sourceLinkTemplate`, #2434.
78
- Improved handling of function-modules created with `Object.assign`, #2436.

src/lib/models/reflections/ReflectionSymbolId.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,11 @@ export function addInferredDeclarationMapPaths(
149149
const declDir = opts.declarationDir || opts.outDir || rootDir;
150150

151151
for (const file of files) {
152-
const mapFile = resolve(declDir, relative(rootDir, file)).replace(
153-
/\.([cm]?[tj]s)x?$/,
154-
".d.$1",
152+
const mapFile = normalizePath(
153+
resolve(declDir, relative(rootDir, file)).replace(
154+
/\.([cm]?[tj]s)x?$/,
155+
".d.$1",
156+
),
155157
);
156158
declarationMapCache.set(mapFile, file);
157159
}

0 commit comments

Comments
 (0)