mirror of
https://github.com/denoland/deno.git
synced 2024-11-27 16:10:57 -05:00
b64ec79268
This change will enable dynamic imports and web workers to use modules not reachable from the main module, by passing a list of extra side module roots as options to `deno compile`. This can be done by specifying "--include" flag that accepts a file path or a URL. This flag can be specified multiple times, to include several modules. The modules specified with "--include" flag, will be added to the produced "eszip".
6 lines
178 B
TypeScript
6 lines
178 B
TypeScript
console.log("Starting the main module");
|
|
|
|
setTimeout(() => {
|
|
console.log("Dynamic importing");
|
|
import("./import1.ts").then(() => console.log("Dynamic import done."));
|
|
}, 0);
|