Skip to content

Commit

Permalink
fix storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
morewings committed Nov 30, 2023
1 parent 8eb0040 commit 3ae9351
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { StorybookConfig } from "@storybook/react-vite";
import { withoutVitePlugins } from "@storybook/builder-vite"

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
Expand All @@ -14,5 +15,11 @@ const config: StorybookConfig = {
docs: {
autodocs: "tag",
},
async viteFinal(config) {
return {
...config,
plugins: await withoutVitePlugins(config.plugins, ['vite:dts']),
}
},
};
export default config;
8 changes: 1 addition & 7 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ export default defineConfig({
resolve: {
alias: hq.get('rollup'),
},
plugins: [
react(),
{
...dts({rollupTypes: true}),
apply: 'build',
},
],
plugins: [react(), dts({rollupTypes: true})],
build: {
lib: {
// Could also be a dictionary or array of multiple entry points
Expand Down

0 comments on commit 3ae9351

Please sign in to comment.