Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup Configs to Generate Tree-Shakable ESM #101

Open
3 tasks
whizzzkid opened this issue Nov 3, 2022 · 0 comments
Open
3 tasks

Cleanup Configs to Generate Tree-Shakable ESM #101

whizzzkid opened this issue Nov 3, 2022 · 0 comments

Comments

@whizzzkid
Copy link
Collaborator

This relates to:

The way we're generating ESM right now transpiles src into ESM which exports the required interfaces for performing geo-ip lookups. This works well for all agents that support module types and allows import/export syntax (e.g. browsers, node, etc) (except for the dependency issues in #100).

However, this takes away the ability to tree-shake the module when ipfs-geoip is included as a dependency to say ipfs-webui because we're unable to bundle this properly. e.g. https://github.com/ipfs-shipyard/ipfs-geoip/actions/runs/3287072521/jobs/5415859864#step:5:124

AI:

  • Cleanup Configs to build ESM valid in both Node-like and browser context
  • Establish imports are tree-shakeable
  • Setup better defaults to check this in aegir.

Would love to hear thoughts on this @SgtPooki, @lidel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant