divviup / divviup-ts

TypeScript client for the Distributed Aggregation Protocol
https://divviup.org
Mozilla Public License 2.0
5 stars 2 forks source link

Add ESM support to dap via package.json exports #1034

Closed tanyav2 closed 3 days ago

tanyav2 commented 4 days ago

The dap package lacks ES module support. This change configures explicit import paths for ESM users (preferred by many bundlers like Vite) using the package.json exports field.

tanyav2 commented 4 days ago

Fixes https://github.com/divviup/divviup-ts/issues/1033

coveralls commented 4 days ago

Pull Request Test Coverage Report for Build 11822011608

Details


Totals Coverage Status
Change from base Build 11802556879: 0.0%
Covered Lines: 3467
Relevant Lines: 4098

💛 - Coveralls
tanyav2 commented 4 days ago

Does the bundler you're using handle this correctly with this one change, or is it necessary to add exports to the transitive dependency packages as well?

I npm packed this and installed it in a Node.js project, and confirmed it didn't break.

Yeah, it works for me, don't need to change anything else.