mirror of
https://github.com/denoland/deno.git
synced 2024-12-11 10:07:54 -05:00
15 lines
324 B
JavaScript
15 lines
324 B
JavaScript
|
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);
|
||
|
}
|