You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to integrate lit-protocol natively within the sp-sdk, and here are my findings.
Background
Currently, SDK depends on Rollup as the bundler of choice to generate both CJS and ESM outputs. Since such an approach seemed good enough for past use cases, this indeed creates many problems and compatibility issues.
Proposed Solution: Direct TypeScript Compilation Approach
This proposal ensures that a move to a modern "exports"-based configuration would better solve module resolution, compatibility, and maintainability issues. The summary of the approach is given below.
Changes in Build:
Use tsc to directly produce ESM (build/esm) and CJS (build/cjs) outputs.
Use tsc to generate a types folder, and remember to add in your exports map type definitions, such as "types": "./build/types/index.d.ts".
DaevMithran
changed the title
[BUG] - Sign Protocol SDK Tooling and Design Changes
[ENHANCEMENT] - Migrate from Rollup to TypeScript-Driven Module Build for Improved Compatibility and Simplicity
Nov 16, 2024
Description
I was able to integrate lit-protocol natively within the sp-sdk, and here are my findings.
Background
Currently, SDK depends on Rollup as the bundler of choice to generate both CJS and ESM outputs. Since such an approach seemed good enough for past use cases, this indeed creates many problems and compatibility issues.
Proposed Solution: Direct TypeScript Compilation Approach
This proposal ensures that a move to a modern "exports"-based configuration would better solve module resolution, compatibility, and maintainability issues. The summary of the approach is given below.
Changes in Build:
Example:
Other Suggestions
Advantages
Codebase URL
https://github.com/DaevMithran/SignxLit
@daevm/ethsign-sp-sdk
Reproduction steps
The text was updated successfully, but these errors were encountered: