dont canonicalize the filename when generating names, just use the absolute path

This commit is contained in:
Wesley Wigham 2015-12-01 18:53:54 -08:00
parent 951a77f7bd
commit 81e012f90f
3 changed files with 5 additions and 5 deletions

View File

@ -1891,7 +1891,7 @@ namespace ts {
export function getExternalModuleNameFromPath(host: EmitHost, fileName: string): string {
const getCanonicalFileName = (f: string) => host.getCanonicalFileName(f);
const dir = toPath(host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName);
const filePath = toPath(fileName, host.getCurrentDirectory(), getCanonicalFileName);
const filePath = getNormalizedAbsolutePath(fileName, host.getCurrentDirectory());
const relativePath = getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false);
return removeFileExtension(relativePath);
}

View File

@ -16,17 +16,17 @@ export var pi = Math.PI;
export var y = x * i;
//// [concat.js]
define("b:/baz", ["require", "exports", "a:/bar", "a:/foo"], function (require, exports, bar_1, foo_1) {
define("B:/baz", ["require", "exports", "A:/bar", "A:/foo"], function (require, exports, bar_1, foo_1) {
"use strict";
exports.pi = Math.PI;
exports.y = bar_1.x * foo_1.i;
});
define("a:/foo", ["require", "exports", "b:/baz"], function (require, exports, baz_1) {
define("A:/foo", ["require", "exports", "B:/baz"], function (require, exports, baz_1) {
"use strict";
exports.i = Math.sqrt(-1);
exports.z = baz_1.pi * baz_1.pi;
});
define("a:/bar", ["require", "exports", "a:/foo"], function (require, exports, foo_2) {
define("A:/bar", ["require", "exports", "A:/foo"], function (require, exports, foo_2) {
"use strict";
exports.x = foo_2.z + foo_2.z;
});

View File

@ -23,7 +23,7 @@ declare class Foo {
x: string;
y: number;
}
declare module "inputfile3" {
declare module "inputFile3" {
export var foo: number;
export var bar: string;
}