mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Modify synthetic default generation code for dual-mode module resolution (#46156)
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user