deno/tests/specs/bench/preload_modules/preload.js
Bartek Iwańczuk f6176a1674
feat: add support for --preload/--import flag (#29626)
This commit adds initial support for `--preload` (aliased to `--import`)
flag that allows to load and execute multiple ES modules before the
entry point modules is executed.

This command is available in `deno run`, `deno test` and `deno bench`
subcommands.

Closes https://github.com/denoland/deno/issues/29776
2025-07-01 16:21:00 +05:30

7 lines
159 B
JavaScript

console.log("preload.js starts loading");
setTimeout(() => {
globalThis.__preload__ = "preload.js";
console.log("preload.js finished loading");
}, 500);