Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Storybook to 6.4.0 and enable auto-detection of controls (woo…
…commerce#5249) (woocommerce#5264) * Migrate Storybook to 6.4.0 and enable auto-detection of controls (woocommerce#5249) Previously our Babel configuration conflicted with the one provided by default by Storybook, making us unable to leverage the automatic detection of properties from both JS and TS components to create controls (formerly known as knobs). Upgrading to 6.4.0 fixes a bug that makes it easier to work with Babel configurations. Also done here: * Removed a few deprecated addons in favor of the replacement ones bundled within Storybook Essentials. * Add auto-detection of certain control types depending on the property names * Add support for TS stories More context: storybookjs/storybook#12292 * Use `react-docgen` only in development environments This should reduce production bundle size dramatically. The only problem here is that Storybook runs its `build` command with the `NODE_ENV` set to `production`. For this reason, we change the script to provide `BABEL_ENV` set to `development` to still make sure the correct configuration is loaded, while trying to reduce any side-effects on changing the whole `NODE_ENV`.
- Loading branch information