Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡️ perf: Bundle optimization! #71

Merged
merged 21 commits into from Oct 4, 2022
Merged

⚡️ perf: Bundle optimization! #71

merged 21 commits into from Oct 4, 2022

Conversation

insulineru
Copy link
Contributor

@insulineru insulineru commented Sep 27, 2022

Check the diff on pictures

main branch
image

This branch
image

Changelog:

  • Change bundler from esbuild to rollup
  • Configure sideEffects, use pure functions everywhere, when it's possible
  • Remove dependencies from ESM bundle (they can be bundled in frontend framework)
  • Change ENUMS to Constants. Enum from Typescript does not support tree-shaking

@vercel
Copy link

vercel bot commented Sep 27, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
web3-wallets ✅ Ready (Inspect) Visit Preview Oct 4, 2022 at 11:30AM (UTC)

.eslintrc Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@@ -744,13 +749,14 @@ const WalletProvider = function WalletProvider({ children }: { children: React.R
// todo: sendTx reject => false
console.log('[Wallet] sendTx', transaction)

const isSolanaTransaction = transaction instanceof Transaction
const isSolanaTransaction = 'partialSign' in transaction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

instanceof requires the import of a module, but my version checks for the presence of a property, but requires only the type to import

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants