refactor(comiler): various cleanups

This commit is contained in:
Tobias Bosch
2016-11-17 20:11:55 -08:00
committed by Chuck Jazdzewski
parent adeea5d86a
commit 3c06a5dc25
6 changed files with 89 additions and 80 deletions

View File

@ -54,13 +54,13 @@ export class CompilerHost implements AotCompilerHost {
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.basePath, 'index.ts');
containingFile = this.getCanonicalFileName(path.join(this.basePath, 'index.ts'));
}
m = m.replace(EXT, '');
const resolved =
ts.resolveModuleName(m, containingFile.replace(/\\/g, '/'), this.options, this.context)
.resolvedModule;
return resolved ? resolved.resolvedFileName : null;
return resolved ? this.getCanonicalFileName(resolved.resolvedFileName) : null;
};
/**