Skip to content

Reduce Package Size React-Wallet-Kit#1164

Open
rayan-fawaz wants to merge 4 commits intotkhq:mainfrom
rayan-fawaz:reduce-package-size-react-wallet-kit
Open

Reduce Package Size React-Wallet-Kit#1164
rayan-fawaz wants to merge 4 commits intotkhq:mainfrom
rayan-fawaz:reduce-package-size-react-wallet-kit

Conversation

@rayan-fawaz
Copy link

@rayan-fawaz rayan-fawaz commented Jan 1, 2026

Summary & Motivation

  1. Added side effects so bundler can remove unused code, although excluded css so it doesn't effect ui
  2. Cleaned up the TypeScript build output by excluding tests and Typedoc files so only runtime code gets compiled and published.
  3. Changed the phone authentication flow so phone validation code is only loaded when SMS login is used, instead of being downloaded for every user on page load, which makes the app load faster for users who don’t use SMS.

Also to reduce package size when people install, I can turn make source maps false. They’re only for debugging , so removing them makes the npm package smaller, but debugging library errors becomes harder. Is it worth it what do u guys think, it makes the dist size from 4.4mb to 1.4mb. I left it on because I seen that other packages had it on too just thought ill bring it up.

How I Tested These Changes

Did you add a changeset?

If updating one of our packages, you'll likely need to add a changeset to your PR. To do so, run pnpm changeset. pnpm changeset will generate a file where you should write a human friendly message about the changes. Note how this (example) includes the package name (should be auto added by the command) along with the type of semver change (major.minor.patch) (which you should set).

These changes will be used at release time to determine what packages to publish and how to bump their version. For more context see this comment.

@socket-security
Copy link

socket-security bot commented Jan 1, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​next/​bundle-analyzer@​16.1.11001009099100

View full report

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 6, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 50833f6:

Sandbox Source
@turnkey/example-react-components Configuration

Copy link
Contributor

@moeodeh3 moeodeh3 left a comment

Choose a reason for hiding this comment

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

looks good - would be awesome if you could attach some videos of what the loading looks like for both the login and update phone number modal!

also, lets rebase :)

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.

2 participants