Allow dynamic import attributes in --module preserve (#59005)

This commit is contained in:
Andrew Branch
2024-06-25 07:31:32 -07:00
committed by GitHub
parent 6c01f6c584
commit fa4f2e5148
6 changed files with 45 additions and 33 deletions

View File

@@ -0,0 +1,12 @@
// @module: preserve
// @target: esnext
// @resolveJsonModule: true
// @noEmit: true
// @noTypesAndSymbols: true
// @Filename: data.json
{}
// @Filename: main.ts
import data1 from "./data.json" with { type: "json" };
const data2 = await import("./data.json", { with: { type: "json" } });