mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
Replace types in viteFinal to fix error
This commit is contained in:
parent
aabf48e5a8
commit
fc7fc7f1a4
@ -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",
|
||||
|
@ -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';
|
||||
@ -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;
|
||||
};
|
||||
|
@ -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:*"
|
||||
|
Loading…
x
Reference in New Issue
Block a user