浏览代码

fix js deprecation warning in wasm init (#4054)

wasm-bindgen now expects an object as parameter, otherwise it issues a warning

Co-authored-by: sebdotv <sebdotv@gmail.com>
Seb. V 2 月之前
父节点
当前提交
741eb0a5e6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/cli/src/build/web.rs

+ 1 - 1
packages/cli/src/build/web.rs

@@ -148,7 +148,7 @@ r#" <script>
       window.__wasm_split_main_initSync = initSync;
 
       // Actually perform the load
-      init("/{base_path}/{wasm_path}").then((wasm) => {
+      init({module_or_path: "/{base_path}/{wasm_path}"}).then((wasm) => {
         if (wasm.__wbindgen_start == undefined) {
             wasm.main();
         }