-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not optimize storybook packages (#323)
This PR removes many of the storybook packages from pre-bundling, which should save a little bit of time in startup, and will 🤞 work a little better in pnpm (see #55, although this probably doesn't fix it yet). Furthermore, after storybook 6.5.0-alpha.58, we can exclude the framework packages from pre-bundling also, but in versions earlier than that, we do need to pre-bundle. So I added a dependency on `semver`, to compare the storybook framework's version from package.json and determine whether to pre-bundle it or not. I tested back to 6.4.0, and it worked fine as long as I added titles to stories (autotitle wasn't working that far back). Here's the difference it makes in the pre-bundled files: Before: <img width="343" alt="Pasted_Image_4_7_22__11_31_PM" src="https://user-images.githubusercontent.com/4616705/162357449-de936070-b450-4873-bb0a-ffb29a9f1645.png"> After: <img width="346" alt="Pasted_Image_4_7_22__11_31_PM" src="https://user-images.githubusercontent.com/4616705/162357382-65933d1d-bf00-422a-b95a-3eb5ecf62c2e.png">
- Loading branch information
Showing
3 changed files
with
37 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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