Closed woodser closed 9 months ago
In Next.js I had no problem using named imports import { MoneroWalletListener } from "monero-ts";
Individual named imports work without any problem, but for some reason, import moneroTs from "monero-ts";
doesn't work like other libraries, only import * as moneroTs from "monero-ts";
works to import everything.
you should add babel plugin "add-module-exports"
Update .babelrc
:
"plugins": [
"@babel/plugin-transform-runtime",
"add-module-exports"
],
and install the babel-plugin-add-module-exports
package as a dev dependency:
npm install babel-plugin-add-module-exports --save-dev
Currently importing all types from monero-ts requires the syntax:
import * as moneroTs from "monero-ts";
This issue requests supporting the following syntax with equivalent functionality:
import moneroTs from "monero-ts";