Skip to content

emit file lost import module in .js with package use export = with build by new typescript@next #39149

Closed
@bluelovers

Description

@bluelovers

TypeScript Version: 3.7.x-dev.201xxxxx

Search Terms:

Code

Version 4.0.0-dev.20200615

bug-web-46035.zip

download the zip and run yarn build will see

note: remember run yarn for install deps before test

import gitRoot from 'git-root2';

let git_root = gitRoot(process.cwd())

console.dir(git_root)

Expected behavior:

https://www.typescriptlang.org/v2/en/play?module=1#code/JYWwDg9gTgLgBAc2DAShC8BmUIjgciRgFocMAmfAbgCgaAbAU3iIH0z4BeRZNDACjA4AxowDOYgHTCA7gBN+ASkV1hEAHZiITSXOBR+bDoqA

var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const git_root2_1 = __importDefault(require("git-root2"));
let git_root = git_root2_1.default(process.cwd());
console.dir(git_root);

Actual behavior:

Object.defineProperty(exports, "__esModule", { value: true });
let git_root = gitRoot(process.cwd());
console.dir(git_root);
//# sourceMappingURL=index.js.map

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

Labels

Fix AvailableA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.RescheduledThis issue was previously scheduled to an earlier milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions