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

Minimize the bundling of prettier in @storybook/core #29084

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

Minimize the bundling of prettier in @storybook/core #29084

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

Comments

@JReinhold
Copy link
Contributor

JReinhold commented Sep 11, 2024

Prettier has been identified as a big part of the bundled output in @storybook/core. It is primarily used for:

  1. Formatting code according to the project's settings when writing/modifying .stories.ts files via Controls
  2. Formatting code snippets in the docs' syntax highlighter

The first usage can instead use an optional dependency on Prettier (and has so before AFAIK).

The second usage presumably only requires prettier/standalone without all the plugins, which is a significantly smaller dependency to prebundle.

See #28571 for a prior attempt at this - ignore the babel parts however, they have already been handled in another way.

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

No branches or pull requests

1 participant