-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I'm using this module in my https://github.com/asbjornenge/onchfs-cli package. Or, I would like to, but I had to build a custom version because of this error when consuming the module:
import { keccak256 } from "js-sha3";
^^^^^^^^^
SyntaxError: Named export 'keccak256' not found. The requested module 'js-sha3' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'js-sha3';
const { keccak256 } = pkg;
Fixing that import statement in the dist/index.mjs fixed my issue. For now I just packed it with my module, but would be nice to get this fixed and comsume it correctly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels