Closed timoe closed 2 years ago
Yup, there is a circular dependency and it's intentional (module creating a Worker, but then Worker importing the original module). Webpack warns about those because they might be accidental, but they're a perfectly valid part of ES modules.
Description
I try to integrate wasm-bindgen-rayon to my web assembly, I'm using webpack as a bundler. When running webpack it ends up in a warning
This happens after I added
pub use wasm_bindgen_rayon::init_thread_pool;
to thelib.rs
file.Or better, as the generated
pkg/index.js
file imports fromworkerHelpers.js
viaimport { startWorkers } from './snippets/wasm-bindgen-rayon-7afa899f36665473/src/workerHelpers.js';
which importsconst pkg = await import('../../..');
.So, I see the circular dependency and have not idea how to resolve that.
Versions
from
Cargo.toml
Webpack
Files
here is my webpack config