This commit is contained in:
Norbert de Langen 2022-06-23 09:09:33 +02:00
parent 9ac29c2330
commit 015232a10b
No known key found for this signature in database
GPG Key ID: FD0E78AF9A837762
3 changed files with 6 additions and 8 deletions

View File

@ -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"

View File

@ -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;

View File

@ -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'),
];