diff --git a/packages/builder-vite/plugins/no-fouc.ts b/packages/builder-vite/plugins/no-fouc.ts index 6d1e0608..f4e81160 100644 --- a/packages/builder-vite/plugins/no-fouc.ts +++ b/packages/builder-vite/plugins/no-fouc.ts @@ -21,22 +21,27 @@ export function noFouc(): Plugin { }; } +/** + * Insert default styles to hide storybook elements as the page loads until JS can + * add the official storybook default head styles and scripts. These lines are mostly + * taken from https://github.com/storybookjs/storybook/blob/next/lib/core-common/templates/base-preview-head.html#L6-L20 + */ function insertHeadStyles(html: string) { return html.replace( '', `