In Vite, I use vite-plugin-wasm in dev env, and everything works well,but if I run build , the /bunlder/index.js looks like doesnt init the WebAssembly.Then I found the sideEffects option in package.json when run build.tree-shaking will remove the init code __wbg_set_wasm(wasm). The source code looks like below:
It should be like:

In Vite, I use
vite-plugin-wasmin dev env, and everything works well,but if Irun build, the/bunlder/index.jslooks like doesnt init the WebAssembly.Then I found thesideEffectsoption inpackage.jsonwhenrun build.tree-shakingwill remove the init code__wbg_set_wasm(wasm). The source code looks like below:It should be like: