diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-08-28 22:30:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-28 15:30:46 -0600 |
commit | bd034e360d036d9634d8526a6eea73979b3ad9e1 (patch) | |
tree | f10130a89208b13bfee039ea661623d81a120e5d /runtime/web_worker.rs | |
parent | 7adaf613bfbeab0f6aed92294e3eea912990d819 (diff) |
refactor(runtime): factor out code between build.rs and worker.rs (#20299)
Adds `runtime/shared.rs` which is imported by both `build.rs` and the
rest of the crate, containing utilities used by both.
Renames the `snapshot_from_snapshot` feature to
`exclude_runtime_main_js` since that's what it does and it's relevant
outside of snapshotting when `__runtime_js_sources` is specified.
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r-- | runtime/web_worker.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 8a88dfa40..17bbb41ea 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -3,8 +3,8 @@ use crate::colors; use crate::inspector_server::InspectorServer; use crate::ops; use crate::permissions::PermissionsContainer; +use crate::shared::runtime; use crate::tokio_util::create_and_run_current_thread; -use crate::worker::runtime; use crate::worker::FormatJsErrorFn; use crate::BootstrapOptions; use deno_broadcast_channel::InMemoryBroadcastChannel; @@ -484,7 +484,7 @@ impl WebWorker { } #[cfg(feature = "__runtime_js_sources")] { - use crate::worker::maybe_transpile_source; + use crate::shared::maybe_transpile_source; for source in extension.esm_files.to_mut() { maybe_transpile_source(source).unwrap(); } |