Skip to content

Tree-shaking #288

@catmcgee

Description

@catmcgee

[do not pick up this issue yet]

go through the entire lib and

  • import @solana/[whatever] instead of @solana/kit , eg
    • RPC client & transport → @solana/rpc, @solana/rpc-transport-http (and @solana/rpc-api, @solana/rpc-types only where needed)
    • Subscriptions → @solana/rpc-subscriptions
    • Transactions (compile/sign) → @solana/transactions
    • Transaction messages (build/transform) → @solana/transaction-messages
    • Signers → @solana/signers
    • Accounts fetch/decode → @solana/accounts, @solana/codecs, @solana/sysvars
    • Error utils → @solana/errors

Add ESLint rule: disallow @solana/kit as an import source

Add "sideEffects": false except for any files that actually run code on import (list those explicitly) (I don’t know what these are yet)

Always use named exports

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions