Skip to content

Commit

Permalink
Vite: Externalize sb-common-assets font to remove warning
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed May 13, 2024
1 parent 99501d2 commit 903c324
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions code/builders/builder-vite/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ export async function build(options: Options) {
outDir: options.outputDir,
emptyOutDir: false, // do not clean before running Vite build - Storybook has already added assets in there!
rollupOptions: {
// Do not try to bundle the storybook runtime, it is copied into the output dir after the build.
external: ['./sb-preview/runtime.js'],
external: [
// Do not try to bundle the Storybook runtime, it is copied into the output dir after the build.
'./sb-preview/runtime.js',
'./sb-common-assets/fonts.css',
],
},
...(options.test
? {
Expand Down

0 comments on commit 903c324

Please sign in to comment.