Publish: Don't distribute src files or unnecessary template files#23853
Merged
Publish: Don't distribute src files or unnecessary template files#23853
Conversation
Member
Author
BeforeAfter |
IanVS
approved these changes
Aug 16, 2023
| "*.js", | ||
| "*.d.ts" | ||
| "*.d.ts", | ||
| "!src/**/*" |
Member
There was a problem hiding this comment.
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.
Member
There was a problem hiding this comment.
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)
This was referenced Aug 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes N/A
What I did
This pull request excludes the
srcdirectories from thefilesfields in thepackage.jsonfiles 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:mergedorci:dailyGH 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-93b33e06shilman/reduce-publish-size93b33e061692175713)To request a new release of this pull request, mention the
@storybookjs/coreteam.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