fix: switch buttplug WASM to --target web for browser compatibility
--target bundler generates static WASM ESM imports that only work through a bundler (vite-plugin-wasm). --target web generates fetch-based WASM loading via import.meta.url which browsers handle natively. - Change wasm-pack build target from bundler to web - Call wasmModule.default() (init) after import in maybeLoadWasm - Restore rollupOptions.external so WASM stays a separate fetch - Removes the need for vite-plugin-wasm in any consumer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
32
packages/buttplug/wasm/package.json
Normal file
32
packages/buttplug/wasm/package.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "buttplug_wasm",
|
||||
"type": "module",
|
||||
"collaborators": [
|
||||
"Nonpolynomial Labs, LLC <kyle@nonpolynomial.com>"
|
||||
],
|
||||
"description": "WASM Interop for the Buttplug Intimate Hardware Control Library",
|
||||
"version": "10.0.0",
|
||||
"license": "BSD-3-Clause",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/buttplugio/buttplug.git"
|
||||
},
|
||||
"files": [
|
||||
"index_bg.wasm",
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"main": "index.js",
|
||||
"homepage": "http://buttplug.io",
|
||||
"types": "index.d.ts",
|
||||
"sideEffects": [
|
||||
"./snippets/*"
|
||||
],
|
||||
"keywords": [
|
||||
"usb",
|
||||
"serial",
|
||||
"hardware",
|
||||
"bluetooth",
|
||||
"teledildonics"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user