summaryrefslogtreecommitdiff
path: root/tests/testdata/compile/dynamic_imports_tmp_lit/main.js
blob: 3bda5977248e500f4d7f99524e0a26e0ff3f838f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const fileNames = [
  "a.js",
  "b.ts",
];

for (const fileName of fileNames) {
  await import(`./sub/${fileName}`);
}

const jsonFileNames = ["data.json", "sub/data2.json"];
for (const fileName of jsonFileNames) {
  const mod = await import(`./other/${fileName}`, { with: { type: "json" } });
  console.log(mod.default);
}