ArweaveTeam / arweave-js

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

Please include the typescript source files in the package #28

Closed mkg20001 closed 3 years ago

mkg20001 commented 5 years ago

This would make it possible to include them in sourcemaps from bundlers and fix this:

⚠️  Could not load source file "../../../../src/common/lib/error.ts" in source map of "../../arweb/node_modules/arweave/web/lib/error.js".
⚠️  Could not load source file "../../../../src/common/lib/transaction.ts" in source map of "../../arweb/node_modules/arweave/web/lib/transaction.js".
⚠️  Could not load source file "../../../../src/common/lib/utils.ts" in source map of "../../arweb/node_modules/arweave/web/lib/utils.js".
⚠️  Could not load source file "../../../src/web/index.ts" in source map of "../../arweb/node_modules/arweave/web/index.js".
⚠️  Could not load source file "../../../src/common/common.ts" in source map of "../../arweb/node_modules/arweave/web/common.js".
⚠️  Could not load source file "../../../../../src/common/lib/crypto/webcrypto-driver.ts" in source map of "../../arweb/node_modules/arweave/web/lib/crypto/webcrypto-driver.js".
⚠️  Could not load source file "../../../src/common/ar.ts" in source map of "../../arweb/node_modules/arweave/web/ar.js".
⚠️  Could not load source file "../../../src/common/wallets.ts" in source map of "../../arweb/node_modules/arweave/web/wallets.js".
⚠️  Could not load source file "../../../src/common/transactions.ts" in source map of "../../arweb/node_modules/arweave/web/transactions.js".
⚠️  Could not load source file "../../../src/common/silo.ts" in source map of "../../arweb/node_modules/arweave/web/silo.js".
⚠️  Could not load source file "../../../../src/common/lib/api.ts" in source map of "../../arweb/node_modules/arweave/web/lib/api.js".
⚠️  Could not load source file "../../../src/common/network.ts" in source map of "../../arweb/node_modules/arweave/web/network.js".
arweave-kyle commented 4 years ago

Hey @mkg20001, simply doing import Arweave from 'arweave/node' or import Arweave from 'arweave/web' should reference typings correctly.

Are you still having trouble with this? if so, could you provide a sample showing how the package is being included? Thanks!