mirror of
https://github.com/denoland/deno.git
synced 2024-12-18 13:22:55 -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);
|
||
|
}
|