Skip to content

Commit

Permalink
Fix storybook build.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrause committed Nov 15, 2024
1 parent f814ea9 commit 94ec559
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
|* the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import { type StorybookConfig } from '@storybook/react-vite';
import { withoutVitePlugins } from '@storybook/builder-vite';


const config: StorybookConfig = {
Expand Down Expand Up @@ -42,5 +43,12 @@ const config: StorybookConfig = {
},
// https://storybook.js.org/docs/configure/images-and-assets#referencing-fonts-in-stories
staticDirs: ['../src/assets'],

async viteFinal(config) {
// Remove `vite-dts` plugin since it can cause some issues on storybook builds (and isn't necessary)
// https://github.com/qmhc/vite-plugin-dts/issues/275
config.plugins = await withoutVitePlugins(config.plugins, ['vite:dts']);
return config;
},
};
export default config;

0 comments on commit 94ec559

Please sign in to comment.