dmonad / lib0

Monorepo of isomorphic utility functions
MIT License
368 stars 65 forks source link

`url` module is not exported from index.js #49

Closed jamespantalones closed 2 years ago

jamespantalones commented 2 years ago

Describe the bug The url module is not exported from the index.js file. Perhaps it is intentional?

dmonad commented 2 years ago

Hi @jamespantalones,

I don't recommend importing index anymore. Some of the modules have side effects (conditionals e.g. export const xx = condition ? implementationA : implementationB) that I can't avoid. By importing index you will import all side effects which can't be removed by tree-shaking/dead-code elimination (and lib0 is quite huge now).

For that reason, I don't add new modules to index anymore. It will be removed in the next major release.

Cheers, Kevin