Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Apr 2, 2024
1 parent d4e2c7d commit f87243d
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { dirname, join } from "path";
import type { StorybookConfig } from "@storybook/react-vite";
import type { UserConfig } from "vite";
import { mergeConfig } from "vite";
import { cssVariableDocgen } from "css-variable-docgen-plugin";
import { typescriptTurbosnap } from "vite-plugin-typescript-turbosnap";
import { cssInline } from "../tooling/css-inline-plugin";
Expand Down Expand Up @@ -30,15 +29,7 @@ const config: StorybookConfig = {
"@storybook/addon-storysource",
],
async viteFinal(config, { configType }) {
// https://github.com/storybookjs/storybook/issues/26532 - package-deduplication breaks ag-grid-react.
const fixedConfig = {
...config,
plugins: config.plugins?.filter(
// @ts-ignore
(plugin) => plugin?.name !== "storybook:package-deduplication"
),
};

const { mergeConfig } = await import("vite");
const customConfig: UserConfig = {
plugins: [cssInline(), cssVariableDocgen()],
};
Expand All @@ -49,7 +40,7 @@ const config: StorybookConfig = {
);
}

return mergeConfig(customConfig, fixedConfig);
return mergeConfig(customConfig, config);
},
};

Expand Down

0 comments on commit f87243d

Please sign in to comment.