1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-12 10:37:52 -05:00
denoland-deno/cli/tests/testdata/compile/dynamic_imports/main.ts
Andreu Botella c58790ef13 test(compile): Add a test for dynamic imports in deno compile (#18017)
denoland/eszip#115 added support for statically-analyzed dynamic imports
in eszip, which made `deno compile` support dynamic imports starting
from #17858. This PR adds a test for it.

----

This test is adapted from PR #17663.

Closes #17908
2023-03-10 12:47:20 +09:00

6 lines
180 B
TypeScript

console.log("Starting the main module");
setTimeout(() => {
console.log("Dynamic importing");
import("./import1.ts").then(() => console.log("Dynamic import done."));
}, 500);