Skip to content

Commit

Permalink
fix: Publish config uses ES dist file
Browse files Browse the repository at this point in the history
Use ES dist file as default export so consumer don't have to rebuild all
files

Especially useful for consumers to not polyfill node dependencies
of bittorrent-tracker dependency
  • Loading branch information
Chocobozzz committed Oct 29, 2024
1 parent 4afd085 commit d2880fc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
13 changes: 11 additions & 2 deletions packages/p2p-media-loader-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,17 @@
"exports": "./src/index.ts",
"types": "./src/index.ts",
"publishConfig": {
"exports": "./lib/index.js",
"types": "./lib/index.d.ts"
"types": "./lib/index.d.ts",
"exports": {
".": {
"default": "./dist/p2p-media-loader-core.es.js",
"types": "./lib/index.d.ts"
},
"./lib": {
"default": "./lib/index.js",
"types": "./lib/index.d.ts"
}
}
},
"sideEffects": false,
"type": "module",
Expand Down
13 changes: 11 additions & 2 deletions packages/p2p-media-loader-hlsjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@
"exports": "./src/index.ts",
"types": "./src/index.ts",
"publishConfig": {
"exports": "./lib/index.js",
"types": "./lib/index.d.ts"
"types": "./lib/index.d.ts",
"exports": {
".": {
"default": "./dist/p2p-media-loader-hlsjs.es.js",
"types": "./lib/index.d.ts"
},
"./lib": {
"default": "./lib/index.js",
"types": "./lib/index.d.ts"
}
}
},
"sideEffects": false,
"type": "module",
Expand Down

0 comments on commit d2880fc

Please sign in to comment.