1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-04 08:54:20 -05:00
denoland-deno/cli/tests/testdata/compile/dynamic_imports/main.ts
Andreu Botella 01028fcdf4
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-05 01:37:54 +00: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);