es-tooling / ecosystem-cleanup

A place to keep track of ongoing efforts to clean up the JS ecosystem
360 stars 2 forks source link

[epic] storybook #31

Open 43081j opened 6 months ago

43081j commented 6 months ago

storybook's dependency tree depends on the flavour of entrypoint you use.

so for this example, let's use the web-components package: https://npmgraph.js.org/?q=@storybook/web-components-vite

there's quite a lot of deep subtrees we can probably trim out here.

good subtrees to remove are:

assert

Depended on by:

qs

Depended on by:

In most cases, we can likely either:

read-pkg-up

This has some use but the dependency tree is bloated for what it is, and there are more performant solutions.

If possible, we should use read-package-json-fast from npm themselves.

We could use fd-package-json: https://github.com/es-tooling/fd-package-json

43081j commented 6 months ago

we can now replace read-pkg-up with fd-package-json: https://github.com/es-tooling/fd-package-json

benmccann commented 2 months ago

express - not sure how likely PRs are to express

express itself is rather bulky and could be swapped out. I just did that in the Svelte repo, which luckily only took me a few lines there: https://github.com/sveltejs/svelte/pull/12155

43081j commented 2 months ago

you're right. i forgot to update this issue too!

i started the work in storybookjs/storybook#27045

although polka is tempting too. though i may do that in a later PR since it'll be an easier move than this one