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

chore: Update Storybook bundler to webpack 5 #56305

Merged
merged 2 commits into from Sep 16, 2021

Conversation

scinos
Copy link
Contributor

@scinos scinos commented Sep 16, 2021

Changes proposed in this Pull Request

Testing instructions

Run these commands and verify the load storybook with stories and there are no warnings in the browser console:

  • yarn components:storybook:start
  • yarn search:storybook:start
  • yarn composite-checkout:storybook:start

@github-actions
Copy link

github-actions bot commented Sep 16, 2021

@scinos scinos requested a review from a team September 16, 2021 04:01
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 16, 2021
@scinos scinos self-assigned this Sep 16, 2021
@matticbot
Copy link
Contributor

matticbot commented Sep 16, 2021

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~1437 bytes added 📈 [gzipped])

name     parsed_size           gzip_size
media        +1030 B  (+0.1%)    +1437 B  (+0.3%)
devdocs      +1030 B  (+0.6%)    +1437 B  (+3.3%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~1437 bytes added 📈 [gzipped])

name                                               parsed_size           gzip_size
async-load-calypso-post-editor-media-modal             +1030 B  (+0.1%)    +1437 B  (+0.4%)
async-load-calypso-post-editor-editor-media-modal      +1030 B  (+0.1%)    +1437 B  (+0.3%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@scinos scinos force-pushed the chore/update-storybook-webpack5 branch from eb989c1 to effd0a7 Compare September 16, 2021 07:25
@scinos scinos marked this pull request as ready for review September 16, 2021 11:52
@@ -264,21 +264,13 @@ object RunAllUnitTests : BuildType({
"""
}
bashNodeScript {
name = "Build components storybook"
name = "Run storybook tests"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged the two Storybook jobs into one, and added composite-checkout.

Also, I dropped NODE_ENV="production". It was causing problems, because Storybook sets it to development internally, and webpack's DefinePlugin was failing with storybookjs/storybook#14257 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

Copy link
Member

@noahtallen noahtallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests well!

@scinos scinos merged commit 9f85848 into trunk Sep 16, 2021
@scinos scinos deleted the chore/update-storybook-webpack5 branch September 16, 2021 19:31
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 16, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants