diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-04-26 19:57:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 19:57:38 +0200 |
commit | 14aaa73c0200d7fac4aa224d623e28b5955daab9 (patch) | |
tree | b5a0c41f831fefb2d506f323a55570493a216787 /core/runtime.rs | |
parent | 2df6db36c85c27d424d54e9c168ef4ea09c5c08c (diff) |
refactor: don't expose Deno[Deno.internal].core namespace (#18816)
Diffstat (limited to 'core/runtime.rs')
-rw-r--r-- | core/runtime.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/runtime.rs b/core/runtime.rs index bae6a40db..6820df6bc 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -479,6 +479,26 @@ impl JsRuntime { } } } + // Cache bust plain JS (non-ES modules as well) + #[cfg(feature = "include_js_files_for_snapshotting")] + if snapshot_options != snapshot_util::SnapshotOptions::None { + let js_sources = options + .extensions + .iter() + .flat_map(|ext| match ext.get_js_sources() { + Some(s) => s.to_owned(), + None => vec![], + }) + .collect::<Vec<ExtensionFileSource>>(); + for source in js_sources { + use crate::ExtensionFileSourceCode; + if let ExtensionFileSourceCode::LoadedFromFsDuringSnapshot(path) = + &source.code + { + println!("cargo:rerun-if-changed={}", path.display()) + } + } + } Rc::new(crate::modules::ExtModuleLoader::new( options.module_loader, |