Skip to content

Commit

Permalink
fix: storybook font loading should not rely on prep step
Browse files Browse the repository at this point in the history
  • Loading branch information
pmelab committed May 8, 2024
1 parent 0b49745 commit 10cc2f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ui/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import { mergeConfig, UserConfig } from 'vite';
import { imagetools } from 'vite-imagetools';
import { resolve, dirname } from 'path';

import fonts from '../build/preloaded-fonts.json';
import { readdirSync } from 'fs';

const fonts = readdirSync(`../static/public/fonts/preload`).map((font) => {
return `/fonts/preload/${font}`;
});

const config: StorybookConfig = {
viteFinal: (config, { configType }) =>
Expand Down

0 comments on commit 10cc2f5

Please sign in to comment.