Feature/package exports#66
Merged
Merged
Conversation
…er-dep metadata Rewrite distribution metadata so the package resolves correctly and tree-shakes in all supported toolchains: - Add explicit `exports` map (`.`: types -> bun -> default, plus `./package.json`); the `bun` condition lets Bun consumers resolve TS source directly, `default` serves the bundled index.js - Remove `"module": "index.ts"` — it pointed at raw TypeScript, breaking webpack and older Rollup configs - Publish the unminified ESM bundle as index.js (~50 KB readable) instead of the minified artifact; consumers' bundlers minify anyway - Make TypeScript an optional peer dependency (`peerDependenciesMeta`) so JS-only consumers don't get an unresolvable-peer warning - Replace fragile `.npmignore` negation patterns with a `files` allowlist - Remove unused index.dev.js artifact Note: `sideEffects: false` from the original plan was dropped because it breaks `bun build` — Bun tree-shakes the barrel re-exports away during the package's own build, producing a broken 827-byte output. Tree-shaking for consumers is preserved because the published index.js is a single inlined ESM file (verified: bundleCoreGzipped stays at 2476B). This is a minor (not patch) version bump: the exports map intentionally blocks deep imports into package internals.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.