summaryrefslogtreecommitdiff
path: root/runtime/examples/hello_runtime_bootstrap.js
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2023-05-04 01:44:59 +0100
committerGitHub <noreply@github.com>2023-05-04 02:44:59 +0200
commit7a8bb3b611f02b272b1c19b6f3d8a85b099ca317 (patch)
tree04d37bb0f8c3fc719b3494114a054f5439733e7a /runtime/examples/hello_runtime_bootstrap.js
parente3276fbb71093faf4e8850f68ed2e080a9bda222 (diff)
fix(core): allow esm extensions not included in snapshot (#18980)
Fixes #18979. This changes the predicate for allowing `ext:` specifier resolution from `snapshot_loaded_and_not_snapshotting` to `ext_resolution_allowed` which is only set to true during the extension module loading phase. Module loaders as used in core are now declared as `ExtModuleLoader` rather than `dyn ModuleLoader`.
Diffstat (limited to 'runtime/examples/hello_runtime_bootstrap.js')
-rw-r--r--runtime/examples/hello_runtime_bootstrap.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/examples/hello_runtime_bootstrap.js b/runtime/examples/hello_runtime_bootstrap.js
new file mode 100644
index 000000000..759dde939
--- /dev/null
+++ b/runtime/examples/hello_runtime_bootstrap.js
@@ -0,0 +1,5 @@
+// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
+function hello() {
+ console.log("Hello from extension!");
+}
+globalThis.Extension = { hello };