diff --git a/presets/react-webpack/package.json b/presets/react-webpack/package.json index 19c3612074f..6e6337b536e 100644 --- a/presets/react-webpack/package.json +++ b/presets/react-webpack/package.json @@ -114,7 +114,7 @@ }, "bundlerEntrypoint": [ "./src/index.ts", - "./src/framework-preset-cra", + "./src/framework-preset-cra.ts", "./src/framework-preset-react-docs.ts", "./src/framework-preset-react-dom-hack.ts", "./src/framework-preset-react.ts" diff --git a/presets/react-webpack/src/framework-preset-cra.ts b/presets/react-webpack/src/framework-preset-cra.ts index 82364ef0ab8..1c7de51b8ea 100644 --- a/presets/react-webpack/src/framework-preset-cra.ts +++ b/presets/react-webpack/src/framework-preset-cra.ts @@ -1,9 +1,7 @@ import { logger } from '@storybook/node-logger'; -import type { StorybookConfig } from '@storybook/core-webpack'; +import type { Preset, StorybookConfig } from '@storybook/core-webpack'; import { isReactScriptsInstalled } from './cra-config'; -type Preset = string | { name: string }; - const checkForNewPreset = (presetsList: Preset[]) => { const hasNewPreset = presetsList.some((preset: Preset) => { const presetName = typeof preset === 'string' ? preset : preset.name; diff --git a/presets/react-webpack/src/index.ts b/presets/react-webpack/src/index.ts index e824691a282..775582ae936 100644 --- a/presets/react-webpack/src/index.ts +++ b/presets/react-webpack/src/index.ts @@ -3,8 +3,8 @@ import type { StorybookConfig } from './types'; export * from './types'; export const addons: StorybookConfig['addons'] = [ - require.resolve('@storybook/react-webpack5/dist/framework-preset-react'), - require.resolve('@storybook/react-webpack5/dist/framework-preset-react-dom-hack'), - require.resolve('@storybook/react-webpack5/dist/framework-preset-cra'), - require.resolve('@storybook/react-webpack5/dist/framework-preset-react-docs'), + require.resolve('@storybook/preset-react-webpack/dist/framework-preset-react'), + require.resolve('@storybook/preset-react-webpack/dist/framework-preset-react-dom-hack'), + require.resolve('@storybook/preset-react-webpack/dist/framework-preset-cra'), + require.resolve('@storybook/preset-react-webpack/dist/framework-preset-react-docs'), ];