Menci / vite-plugin-wasm

Add WebAssembly ESM integration (aka. Webpack's `asyncWebAssembly`) to Vite and support `wasm-pack` generated modules.
MIT License
295 stars 17 forks source link

Cannot read properties of undefined (reading 'load') #6

Closed wanglei8381 closed 2 years ago

wanglei8381 commented 2 years ago

originalWasmPlugin = resolvedConfig.plugins.find(plugin => plugin.name === "vite:wasm");

vite:wasm这个插件找不到导致的(vite 3.0)

Menci commented 2 years ago

Vite 3.0 的确不需要这部分代码了,我有空适配一下

Menci commented 2 years ago

不对,还是要这段代码的,我提的 fileToUrl 在 3.0 还没有 landing,我适配一下 3.0 的新内置 WASM 插件名

Menci commented 2 years ago

试一下 2.x 分支 https://github.com/Menci/vite-plugin-wasm/tree/2.x

JasonMan34 commented 2 years ago

Is there going to be a published 2.x version in npm soon?

Menci commented 2 years ago

Sorry. The code was ready 3 days ago but I forgot to publish it ...

On Tue, Jul 19, 2022 at 9:28 PM JasonMan34 @.***> wrote:

Is there going to be a published 2.x version in npm soon?

— Reply to this email directly, view it on GitHub https://github.com/Menci/vite-plugin-wasm/issues/6#issuecomment-1189055214, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWRBA26BXNYM6PY5YRRJC3VU2URTANCNFSM53RVRDGQ . You are receiving this because you commented.Message ID: @.***>