Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/wasm32/js/module_workers_polyfill.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/wasm32/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ impl Builder {

#[cfg(feature = "es_modules")]
{
utils::load_module_workers_polyfill();
js_sys::eval(include_str!("js/module_workers_polyfill.min.js")).unwrap();
options.type_(WorkerType::Module);
}
#[cfg(not(feature = "es_modules"))]
Expand Down
6 changes: 0 additions & 6 deletions src/wasm32/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ pub fn is_web_worker_thread() -> bool {
js_sys::eval("self").unwrap().dyn_into::<WorkerGlobalScope>().is_ok()
}

#[cfg(feature = "es_modules")]
#[wasm_bindgen(module = "/src/wasm32/js/module_workers_polyfill.min.js")]
extern "C" {
pub fn load_module_workers_polyfill();
}

/// Extracts path of the `wasm_bindgen` generated .js shim script.
///
/// Internally, this intentionally generates a javascript exception to obtain a stacktrace containing the current script
Expand Down
Loading