Modify synthetic default generation code for dual-mode module resolution (#46156)

This commit is contained in:
Wesley Wigham
2021-10-01 09:18:44 -07:00
committed by GitHub
parent 016d78b09e
commit ccc19092ff
14 changed files with 236 additions and 81 deletions

View File

@@ -0,0 +1,19 @@
// @module: node12,nodenext
// @declaration: true
// @filename: subfolder/index.ts
// cjs format file
export const a = 1;
// @filename: index.ts
// esm format file
import mod from "./subfolder/index.js";
mod;
// @filename: package.json
{
"name": "package",
"private": true,
"type": "module"
}
// @filename: subfolder/package.json
{
"type": "commonjs"
}