Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add external package importer-exporter #1214

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Mar 19, 2024

This PR adds a package called @smithy/external, which re-exports external dependencies.

Why:

  • Using package.json->"exports" introduced in Node.js 12, this package provides Node.js runtimes a bundled re-export of uuid and potentially other external dependencies in the future. This reduces the file count, since otherwise direct import of uuid adds a dozen or so files.
  • Using browser or ESM build systems and runtimes continues to use the actual uuid package, avoiding redundant bundling in web.

This doesn't actually require Node.js 16 as the minimum, but TypeScript won't understand the sub-export otherwise.

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.

None yet

1 participant