Skip to content

fix: improve package exports and module resolution#668

Merged
chybisov merged 3 commits intomainfrom
chore/improve-package-compatibility
Mar 16, 2026
Merged

fix: improve package exports and module resolution#668
chybisov merged 3 commits intomainfrom
chore/improve-package-compatibility

Conversation

@chybisov
Copy link
Copy Markdown
Member

@chybisov chybisov commented Mar 11, 2026

Why was it implemented this way?

Improves package compatibility for consumers by updating the export structure in formatPackageJson.js:

  • defaultimport in export conditions — makes the ESM intent explicit and improves resolution in bundlers that differentiate between import and require conditions
  • Added module field — provides a fallback entry point for older bundlers (e.g. Webpack 4) that don't support the exports map
  • Added typesVersions — ensures TypeScript can resolve subpath export types in projects using moduleResolution: "node" (not just "bundler" or "node16")
  • Restructured skeleton export — moved the ./skeleton subpath into the shared allSubpathExports so it's included in typesVersions generation

Also includes the 4.0.0-alpha.3 version bump across all packages.

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.
  • If this PR modifies the Widget API or adds new features that require documentation, I have updated the documentation in the public-docs repository.

@chybisov chybisov changed the title fix: update export structure and improve module resolution fix: improve package exports and module resolution Mar 16, 2026
@chybisov chybisov merged commit 78fa200 into main Mar 16, 2026
2 checks passed
@chybisov chybisov deleted the chore/improve-package-compatibility branch March 16, 2026 16:27
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.

1 participant