Skip to content

Commit

Permalink
Fix final circular iports, make fast refresh work
Browse files Browse the repository at this point in the history
  • Loading branch information
samwhale committed Apr 4, 2022
1 parent 65c27ea commit 9a3118d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
*/
import { ThemeProvider } from 'styled-components';
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
/**
* Internal dependencies
*/
import {
theme as designSystemTheme,
lightMode,
Expand All @@ -35,10 +32,14 @@ import {
ConfigProvider as DashboardConfigProvider,
ApiProvider,
} from '@googleforcreators/dashboard';
import {
GlobalStyle,
EditorConfigProvider,
} from '@googleforcreators/story-editor';

/**
* Internal dependencies
*/
// Disable reason: Fast refresh is finding circular imports at story editor's root from unrelated exports (like theme from the design system).
// Prevented by importing the config provider directly.
// eslint-disable-next-line import/no-relative-packages
import EditorConfigProvider from '../packages/story-editor/src/app/config/configProvider';

// @todo: Find better way to mock these.
const wp = {};
Expand Down Expand Up @@ -134,7 +135,6 @@ export const decorators = [
return (
<ThemeProvider theme={designSystemTheme}>
<EditorConfigProvider config={{ isRTL }}>
<GlobalStyle />
<CropMoveableGlobalStyle />
<ModalGlobalStyle />
{Story()}
Expand Down

0 comments on commit 9a3118d

Please sign in to comment.