connect-kit icon indicating copy to clipboard operation
connect-kit copied to clipboard

Retrofit `@ledgerhq/connect-kit-loader` to be a synchronous loader instead

Open bowd opened this issue 2 years ago • 3 comments

Description

Not using the async loader moving forward is a good decision, but many people need help upgrading their dependencies. For example, if you're using wagmi pre v1, it's hard to get to a recent version that would ensure you no longer load dependencies from the CDN.

I propose taking a different approach and retrofitting this existing package and removing the async loading from it, but instead, add @ledgerhq/connect-kit as a dependency and return that from the loader function. The idea behind this is that we can publish a version of this package and then use npm overrides or yarn resolutions to force this retrofitted version of @ledgerhq/connect-kit-loader into your app without needing to update any other dependencies but removing the async part of the code.

Other changes

  • The connect-kit package wasn't specifying the correct types path in package.json

bowd avatar Dec 15 '23 15:12 bowd