Skip to content

Commit

Permalink
Replace types in viteFinal to fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjtc committed Sep 14, 2023
1 parent aabf48e commit fc7fc7f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion code/addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"@storybook/builder-vite": "workspace:*",
"react": "^16.14.0",
"react-dom": "^16.8.0",
"typescript": "~4.9.3",
Expand Down
5 changes: 2 additions & 3 deletions code/addons/docs/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { dedent } from 'ts-dedent';
import type { DocsOptions, Indexer, Options, StorybookConfig } from '@storybook/types';
import type { CsfPluginOptions } from '@storybook/csf-plugin';
import type { JSXOptions, CompileOptions } from '@storybook/mdx2-csf';
import type { StorybookConfigVite } from '@storybook/builder-vite';
import { global } from '@storybook/global';
import { loadCsf } from '@storybook/csf-tools';
import { logger } from '@storybook/node-logger';
Expand Down Expand Up @@ -176,11 +175,11 @@ export const addons: StorybookConfig['addons'] = [
require.resolve('@storybook/react-dom-shim/dist/preset'),
];

export const viteFinal: StorybookConfigVite['viteFinal'] = async (config, ...options) => {
export const viteFinal = async (config: any, options: Options) => {
const { plugins = [] } = config;
const { mdxPlugin } = await import('./plugins/mdx-plugin');

plugins.push(mdxPlugin(...options));
plugins.push(mdxPlugin(options));

return config;
};
Expand Down
1 change: 0 additions & 1 deletion code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5907,7 +5907,6 @@ __metadata:
"@mdx-js/react": ^2.1.5
"@rollup/pluginutils": ^5.0.2
"@storybook/blocks": "workspace:*"
"@storybook/builder-vite": "workspace:*"
"@storybook/client-logger": "workspace:*"
"@storybook/components": "workspace:*"
"@storybook/csf-plugin": "workspace:*"
Expand Down

0 comments on commit fc7fc7f

Please sign in to comment.