dmonad / lib0

Monorepo of isomorphic utility functions
MIT License
345 stars 63 forks source link

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

Closed jamespantalones closed 1 year ago

jamespantalones commented 1 year ago

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

dmonad commented 1 year 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