We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8372c16 commit 8fad7c5Copy full SHA for 8fad7c5
src/js.rs
@@ -104,6 +104,9 @@ extern "C" {
104
#[wasm_bindgen(method, js_name = getRandomValues, catch)]
105
fn get_random_values(this: &BrowserCrypto, buf: &Uint8Array) -> Result<(), JsValue>;
106
107
+ // We use a "module" object here instead of just annotating require() with
108
+ // js_name = "module.require", so that Webpack doesn't give a warning. See:
109
+ // https://github.com/rust-random/getrandom/issues/224
110
type NodeModule;
111
#[wasm_bindgen(js_name = module)]
112
static NODE_MODULE: NodeModule;
0 commit comments