diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-02-22 18:21:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-22 18:21:07 +0100 |
commit | 2bd7482295daae4edfd367d84505bb43735cd410 (patch) | |
tree | 630e464f60272053bfb9163bca82f7bb70a77174 | |
parent | b4b718d6aefd7c234b8d632d0d67293a7ab9e22b (diff) |
fix(core): rebuild when JS sources for snapshotting change (#17876)
-rw-r--r-- | core/runtime.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/runtime.rs b/core/runtime.rs index c028d97c2..1f325ad32 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -616,6 +616,16 @@ impl JsRuntime { .flat_map(|ext| ext.get_esm_sources().to_owned()) .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()) + } + } + Rc::new(crate::modules::InternalModuleLoader::new( options.module_loader, esm_sources, |