Open coodos opened 5 months ago
can be fixed pretty simply with adding explicit exports in package.json
"exports": {
"./node": {
"require": "./node/lib/index.js",
"import": {
"types": "./node/lib/index.d.js",
"default": "./node/lib/index.js"
},
"default": "./node/lib/index.js"
}
}
@coodos your example is missing the web export which results in Missing "./web" specifier in "@iota/sdk-wasm" package
for packages that want to use it
For me I can use import { Client } from '@iota/sdk-wasm/node/lib/index.js';
in an ESM project
Issue description
WASM bindings do not work with ESM
Version
v0.1.3
Expected behaviour
bindings work
Actual behaviour
since in package.json just
files
are exported in an ESM project you can't consume from directories likenode
andweb
Can the issue reliably be reproduced?
Yes
Steps to reproduce the issue
Errors
ModuleNotFound
Duplicate declaration