buttplug-js icon indicating copy to clipboard operation
buttplug-js copied to clipboard

WASM library missing entry point

Open Sir-Prise opened this issue 1 year ago • 0 comments

I'm trying to use buttplug-wasm, but I think the library is missing an entry point in the package.json ("exports"), because I only got it to work with a deep import like this:

// @ts-ignore
import { ButtplugWasmClientConnector } from 'buttplug-wasm/dist/buttplug-wasm.mjs';

Without the ts-ignore there's also an error message from TypeScript (but it works nonetheless):

error TS2307: Cannot find module 'buttplug-wasm/dist/buttplug-wasm.mjs'.

By the way, I was also trying to use the wasm-library from cdn to save bandwith, but that was unsuccessful so far in TypeScript for me.

Sir-Prise avatar Oct 31 '23 09:10 Sir-Prise