build: shrink publish ~40% via files allowlist#10939
Merged
Merged
Conversation
…ping unused source maps
jasonsaayman
added a commit
that referenced
this pull request
May 28, 2026
…ping unused source maps (#10939) Co-authored-by: Jay <jasonsaayman@gmail.com>
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.
Summary
Switch from
.npmignoreto afilesallowlist inpackage.json, and stop shipping the four source maps for the unminified bundles. The.min.js.mapfiles are kept so CDN consumers can still debug.Linked issue
N/A
Changes
filestopackage.jsoncoveringindex.*,lib/,CHANGELOG.md,MIGRATION_GUIDE.md, and the bundles actually referenced bymain/module/exports/jsdelivr/unpkg..npmignore.dist/axios.js.map,dist/esm/axios.js.map,dist/browser/axios.cjs.map,dist/node/axios.cjs.mapfrom the publish (they mapped a readable bundle back tolib/, which already ships).Verified with
npm pack --dry-runthat every entry point still resolves:dist/node/axios.cjs(main),dist/browser/axios.cjs,dist/esm/axios.js,index.js,index.d.ts/index.d.cts,dist/axios.min.js(jsdelivr/unpkg).Checklist
npm pack --dry-run.index.d.tsandindex.d.cts)Summary by cubic
Shrink the published package ~40% by switching to a
filesallowlist and removing unused unminified source maps. Keeps.min.js.mapfor CDN debugging; all entry points remain unchanged.Description
package.jsonfilesallowlist (includeindex.js,index.d.ts,index.d.cts,CHANGELOG.md,MIGRATION_GUIDE.md,lib/,dist/axios.js,dist/axios.min.js,dist/axios.min.js.map,dist/esm/axios.js,dist/esm/axios.min.js,dist/esm/axios.min.js.map,dist/browser/axios.cjs,dist/node/axios.cjs); remove.npmignore.dist/axios.js.map,dist/esm/axios.js.map,dist/browser/axios.cjs.map,dist/node/axios.cjs.map; keep.min.js.map.npm pack --dry-runthatmain/module/exports/jsdelivr/unpkgentry points resolve:dist/node/axios.cjs,dist/browser/axios.cjs,dist/esm/axios.js,index.js,index.d.ts/index.d.cts,dist/axios.min.js./docs/about publish contents and that only.min.js.mapfiles are shipped for CDN debugging.Written for commit 0b13289. Summary will update on new commits. Review in cubic