Files
sexy/packages/buttplug/package.json
Sebastian Krüger 24f53983d7
Some checks failed
Build and Push Backend Image / build (push) Successful in 47s
Build and Push Buttplug Image / build (push) Has been cancelled
Build and Push Frontend Image / build (push) Has been cancelled
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>
2026-03-08 14:07:14 +01:00

27 lines
589 B
JSON

{
"name": "@sexy.pivoine.art/buttplug",
"version": "1.0.0",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "vite build",
"build:wasm": "wasm-pack build --out-dir wasm --out-name index --target web --release",
"serve": "node serve.mjs"
},
"dependencies": {
"eventemitter3": "^5.0.4",
"typescript": "^5.9.3",
"vite": "^7.3.1",
"vite-plugin-wasm": "3.5.0",
"ws": "^8.19.0"
},
"devDependencies": {
"wasm-pack": "^0.14.0"
}
}