webrecorder / replayweb.page

Serverless replay of web archives directly in the browser
https://replayweb.page
GNU Affero General Public License v3.0
688 stars 55 forks source link

[Feature]: Make package exports explicit #337

Closed emma-sg closed 3 months ago

emma-sg commented 3 months ago

Context

Currently, almost all files are included in the package exports. This leads to some frustrating user experiences when trying to consume various parts of the package in another package, as in order for types to be available, you have to import the un-bundled src files, which means your bundler needs to know how to handle all the file types in the same way that the bundler in this repo does, but inside node_modules.

What change would you like to see?

Files meant to be consumed from other packages should be easily accessible as bundled javascript with type declarations alongside, and files not meant for consumption shouldn't be importable.

Requirements

No response

Todo

No response