summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/Cargo.toml2
-rw-r--r--runtime/web_worker.rs7
-rw-r--r--runtime/worker.rs7
3 files changed, 11 insertions, 5 deletions
diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml
index ddbd7729c..b7dde51d8 100644
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -22,7 +22,7 @@ include_js_files_for_snapshotting = [
]
# A dev feature to disable creations and loading of snapshots in favor of
# loading JS sources at runtime.
-__runtime_js_sources = ["include_js_files_for_snapshotting"]
+hmr = ["include_js_files_for_snapshotting"]
# Signal that only snapshotted JS sources should be used. This will
# conditionally exclude the runtime source transpilation logic, and add an
# assertion that a snapshot is provided.
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index 07a955efb..08de53216 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -518,8 +518,11 @@ impl WebWorker {
ops::web_worker::deno_web_worker::init_ops_and_esm(),
];
- #[cfg(__runtime_js_sources)]
- assert!(cfg!(not(feature = "only_snapshotted_js_sources")), "'__runtime_js_sources' is incompatible with 'only_snapshotted_js_sources'.");
+ #[cfg(hmr)]
+ assert!(
+ cfg!(not(feature = "only_snapshotted_js_sources")),
+ "'hmr' is incompatible with 'only_snapshotted_js_sources'."
+ );
for extension in &mut extensions {
if options.startup_snapshot.is_some() {
diff --git a/runtime/worker.rs b/runtime/worker.rs
index 4e16afeeb..9207de227 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -454,8 +454,11 @@ impl MainWorker {
ops::web_worker::deno_web_worker::init_ops_and_esm().disable(),
];
- #[cfg(__runtime_js_sources)]
- assert!(cfg!(not(feature = "only_snapshotted_js_sources")), "'__runtime_js_sources' is incompatible with 'only_snapshotted_js_sources'.");
+ #[cfg(hmr)]
+ assert!(
+ cfg!(not(feature = "only_snapshotted_js_sources")),
+ "'hmr' is incompatible with 'only_snapshotted_js_sources'."
+ );
for extension in &mut extensions {
if options.startup_snapshot.is_some() {