You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A library (built with build.lib) with inlined WebAssembly (.wasm) files fails in Node.js < 16. This is because the Vite-generated bindings use atob(), which is available only in Node.js 16+.
Although Vite is primarily geared towards web browsers, Vite's Library Mode is useful for developing isomorphic libraries that must support browsers and Node.js. Since Node.js v14 has plenty of time to reach EOL (due April 2023), it would be great to support it.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Describe the bug
A library (built with
build.lib
) with inlined WebAssembly (.wasm
) files fails in Node.js < 16. This is because the Vite-generated bindings useatob()
, which is available only in Node.js 16+.The binding code is:
vite/packages/vite/src/node/plugins/wasm.ts
Lines 9 to 18 in d402ad3
Although Vite is primarily geared towards web browsers, Vite's Library Mode is useful for developing isomorphic libraries that must support browsers and Node.js. Since Node.js v14 has plenty of time to reach EOL (due April 2023), it would be great to support it.
Reproduction
https://github.com/pastelmind/vite-wasm-node14-bug
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: