fix(language-service): ensure correct paths are passed to TypeScript (#21812)
The 2.6 version of TypeScript's `resolveModuleName` started to require paths passed to be separated by '/' instead of being able to handle '\'. `ngc` and `ng` already do this transformation. Fixes: #21811 PR Close #21812
This commit is contained in:

committed by
Jason Aden

parent
778e6e759f
commit
250c8da768
@ -69,7 +69,7 @@ export class ReflectorHost implements StaticSymbolResolverHost {
|
||||
throw new Error('Resolution of relative paths requires a containing file.');
|
||||
}
|
||||
// Any containing file gives the same result for absolute imports
|
||||
containingFile = path.join(this.options.basePath !, 'index.ts');
|
||||
containingFile = path.join(this.options.basePath !, 'index.ts').replace(/\\/g, '/');
|
||||
}
|
||||
const resolved =
|
||||
ts.resolveModuleName(moduleName, containingFile !, this.options, this.hostAdapter)
|
||||
|
Reference in New Issue
Block a user