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

Investigate removing CJS outputs for client-only entry points #29164

Open
Tracked by #29038
JReinhold opened this issue Sep 19, 2024 · 0 comments
Open
Tracked by #29038

Investigate removing CJS outputs for client-only entry points #29164

JReinhold opened this issue Sep 19, 2024 · 0 comments
Assignees

Comments

@JReinhold
Copy link
Contributor

JReinhold commented Sep 19, 2024

When going through the exports in @storybook/core's package.json, the following entry points stands out, because they should theoretically only ever be used in the browser, so there is no need to bundle and distribute a CJS version of them as well:

  • /client-logger
  • /preview-errors
  • /preview-api
  • /manager-api
  • /router
  • /components
  • /theming
  • /theming/create

Collectively these CJS files make up 2.2 MB of the final bundle.

Notice that the manager-errors entry point already does not contain a CJS condition.

I might be missing some crucial context about how Webpack bundles, or how this all work together with Portable Stories (especially in Jest)

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

2 participants