Skip to content

Commit

Permalink
fix(storybook): broken styles in storybook after HMR (uber#3057)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtsao authored Mar 17, 2020
1 parent 3bdd6c5 commit 00eaf97
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions e2e/storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ initializeRTL();

// Add providers for theme and styletron
const engine = new Styletron();

addDecorator((story, context) => {
return (
<StyletronProvider value={engine}>
Expand All @@ -36,3 +37,7 @@ addDecorator((story, context) => {
addParameters({options: {showAddonPanel: false}});

configure(() => require('./load-stories.js'), module);

if (module.hot) {
configure(() => require('./load-stories.js'), module);
}

0 comments on commit 00eaf97

Please sign in to comment.