ArweaveTeam / arweave-js

Browser and Nodejs client for general interaction with the arweave protocol and gateways
MIT License
594 stars 129 forks source link

fix(exports): fix exports for node and web #227

Closed dtfiedler closed 5 months ago

dtfiedler commented 6 months ago

Allows for the imports of enviornment specific arweave modules

import { NodeArweave } from 'arweave/node';
import { WebArweave } from 'arweave/web';
rosmcmahon commented 6 months ago

will take a look at this at some point later.

rosmcmahon commented 6 months ago

what is the purpose of this, why is this PR needed? without this PR, you can already do: import NodeVersion from 'arweave/node' or import WebVersion from 'arweave/web'

in fact that used to be the only way to do it until the package was changed to allow import Arweave from 'arweave'

rosmcmahon commented 6 months ago

yes, this does in fact break all current apps i think @dtfiedler ?

standard import method no longer works with your PR: image

dtfiedler commented 6 months ago

I'll provide a commit and detailed explanation of the intent later today

dtfiedler commented 5 months ago

closing - there are various but inconcsitent issues with exports in certain tscinfig, but no smoking gun to make it work well with each. apologies for the lingering PR.