-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Publish: Don't distribute src files or unnecessary template files #23853
Conversation
Before
After
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic 👏
@@ -56,7 +56,8 @@ | |||
"dist/**/*", | |||
"README.md", | |||
"*.js", | |||
"*.d.ts" | |||
"*.d.ts", | |||
"!src/**/*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, how was src
being included in the first place? Was it the "*.js"
? Most of our src files are typescript, so I'm wondering how you're saving so many MB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the *.js match would include things in src such as src/__mockdata__/someStory.js
and things like that.
The biggest chunk that got shaved off doesn't come from that, it comes from changes like this:
- "template/**/*",
+ "template/cli/**/*",
because we were introducing a lot of example stories that only matter for our sandboxes (a little over 800kb)
Closes N/A
What I did
This pull request excludes the
src
directories from thefiles
fields in thepackage.json
files of all the addons and builders in the Storybook monorepo. This reduces the package sizes and avoids publishing unnecessary source files.How to test
Need to do a canary release
Checklist
MIGRATION.MD
Maintainers
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts
["cleanup", "BREAKING CHANGE", "feature request", "bug", "build", "documentation", "maintenance", "dependencies", "other"]
🦋 Canary release
This pull request has been released as version
0.0.0-pr-23853-sha-93b33e06
. Install it by pinning all your Storybook dependencies to that version.More information
0.0.0-pr-23853-sha-93b33e06
shilman/reduce-publish-size
93b33e06
1692175713
)To request a new release of this pull request, mention the
@storybookjs/core
team.core team members can create a new canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=23853