Skip to content

Commit

Permalink
fix(SLB-222): build fontlist during prep
Browse files Browse the repository at this point in the history
  • Loading branch information
pmelab committed May 29, 2024
1 parent 7dffe9f commit c02c7f1
Show file tree
Hide file tree
Showing 2 changed files with 257 additions and 127 deletions.
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
Loading

0 comments on commit c02c7f1

Please sign in to comment.