fix: typegen stable path generation with Windows (#400)
* fix: typegen stable path generation with Windows When using Windows, rootTypings paths are using `\` instead of `/` in generated code. This commit fixes it. * Replace all Windows path separators in rootTypings Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
This commit is contained in:
parent
a10463e77c
commit
035e0a1092
|
|
@ -170,7 +170,9 @@ export class TypegenPrinter {
|
|||
const importPath = (path.isAbsolute(val.path)
|
||||
? relativePathTo(val.path, outputPath)
|
||||
: val.path
|
||||
).replace(/(\.d)?\.ts/, "");
|
||||
)
|
||||
.replace(/(\.d)?\.ts/, "")
|
||||
.replace(/\\+/g, "/");
|
||||
importMap[importPath] = importMap[importPath] || new Set();
|
||||
importMap[importPath].add(
|
||||
val.alias ? `${val.name} as ${val.alias}` : val.name
|
||||
|
|
|
|||
Loading…
Reference in New Issue