summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/runtime.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/core/runtime.rs b/core/runtime.rs
index c3768d5fa..ef6d4d2f2 100644
--- a/core/runtime.rs
+++ b/core/runtime.rs
@@ -604,12 +604,14 @@ impl JsRuntime {
.collect::<Vec<ExtensionFileSource>>();
#[cfg(feature = "include_js_files_for_snapshotting")]
- for source in &esm_sources {
- use crate::ExtensionFileSourceCode;
- if let ExtensionFileSourceCode::LoadedFromFsDuringSnapshot(path) =
- &source.code
- {
- println!("cargo:rerun-if-changed={}", path.display())
+ if snapshot_options != SnapshotOptions::None {
+ for source in &esm_sources {
+ use crate::ExtensionFileSourceCode;
+ if let ExtensionFileSourceCode::LoadedFromFsDuringSnapshot(path) =
+ &source.code
+ {
+ println!("cargo:rerun-if-changed={}", path.display())
+ }
}
}