Skip to content

🐛 [SDKv3] Conflict of exports between ./thor and ./viem #2727

@claytonneal

Description

@claytonneal

Description

To better aid bundle analyzers we need a default root entry point to the SDK library
This means adding a src/index.ts file with exports from common, thor, viem
However the viem layer exports types with the same name as the thor layer

Image

Aim of this ticket is to:

  • understand why the conflict exists
  • fix the conflict by renaming what we can
  • add the index.ts file
  • add the following into the sdk/package.json to add the root entry
under the "exports" section add:

".": {
    "types": "./dist/index.d.ts",
    "import": "./dist/index.mjs",
    "require": "./dist/index.js"
  },
  • build the project locally and ensure that in the dist folder there are:
dist/index.mjs
dist/index.js   (or .cjs)
dist/index.d.ts

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions