Skip to content

Instantly share code, notes, and snippets.

@shilman
Last active October 26, 2021 15:13
Show Gist options
  • Save shilman/bae0a5e67015556fde430af19d452542 to your computer and use it in GitHub Desktop.
Save shilman/bae0a5e67015556fde430af19d452542 to your computer and use it in GitHub Desktop.
6.4 QA: On-demand architecture

Storybook 6.4 QA: On-demand architecture

Storybook 6.4 introduces a whole new core architecture to enable performance optimization. The "on-demand store" makes it possible to code-split Storybook, which leads to smaller bundle sizes, and will enable incremental compilation and granular file-system caching when used with Webpack5.

Storybook 6.4-alpha.35 introduces this massive change to the codebase via PR #15871. Now we're in stabilization mode, trying to get it ready for release.

Testing backwards compatibility

Our primary QA objective is to make sure that we have not broken any existing functionality in Storybook. To test this, please upgrade your Storybook to the latest prerelease:

npx sb@next upgrade --prerelease

That's it! If your storybook, its addons, and your CI all behave as before, that's frankly a miracle given the scope of the change.

If something looks wrong, please let us know by filing an issue. If you're upgrading from a stable version, perhaps try downgrading to 6.4-alpha.34 to see if the bug was due to the on-demand PR or something else in the alpha.

Back compat known limitations

There are no-known limitations to the back-compat mode.

Testing on-demand store

The on-demand store is the next-generation architecture, designed for code splitting and improved performance. You can read all about it in the blog post Storybook on-demand architecture.

To try it out, upgrade an existing project:

npx sb upgrade --prerelease

Or add Storybook to a project:

npx sb@next init

Then enable the feature flag:

// .storybook/main.js
module.exports = {
  features: {
    storyStoreV7: true,
  }
};

On-demand store limitations

The on-demand store has a few limitations by design:

  1. storiesOf stories are not supported
  2. It breaks if you use dynamic story names or component titles
  3. The signature for parameters.storySort has changed

You can read more about these in MIGRATION.md

We're also tracking bugs with the label on-demand store.

@RobertAKARobin
Copy link

How long does it typically take for a new release to be made official?

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