Repository: storybookjs/storybook
File: code/lib/cli-storybook/src/sandbox-templates.ts (TypeScript)

Code before:
        features: {
          developmentModeForBuild: true,
          experimentalTestSyntax: true,
        },
      },
    },
    skipTasks: ['e2e-tests', 'bench'],
  },
  'react-webpack/18-ts': {
    name: 'React Latest (Webpack | TypeScript)',
    script: 'yarn create webpack5-react {{beforeDir}}',
    expected: {
      framework: '@storybook/react-webpack5',
      renderer: '@storybook/react',
      builder: '@storybook/builder-webpack5',
    },
    modifications: {
      useCsfFactory: true,
      extraDependencies: ['prop-types'],
      mainConfig: {
        features: {
          experimentalTestSyntax: true,
        },
      },
    },
    skipTasks: ['e2e-tests', 'bench', 'vitest-integration'],
  },
  'react-webpack/17-ts': {
    name: 'React v17 (Webpack | TypeScript)',
    script:
      'yarn create webpack5-react {{beforeDir}} --version-react="17" --version-react-dom="17"',
    expected: {
      framework: '@storybook/react-webpack5',
      renderer: '@storybook/react',
      builder: '@storybook/builder-webpack5',
    },
    modifications: {
      useCsfFactory: true,
      extraDependencies: ['prop-types'],
      mainConfig: {
        features: {
          experimentalTestSyntax: true,
        },
      },
    },
    skipTasks: ['e2e-tests', 'bench', 'vitest-integration'],
  },
  'react-webpack/prerelease-ts': {
    name: 'React Prerelease (Webpack | TypeScript)',
    /**
     * 1. Create a Webpack project with React beta versions

Review comment (suggestion):
(unrelated to this PR):
Does it make sense to also test a Vite-based sandbox? @shilman, what are your thoughts on this? The main reason this PR introduces `react-docgen-typescript` is to see whether the non-fork version regresses in any areas. Testing showed that it does not. Still, apart from having tested it manually, do we want to have one webpack and one Vite sandbox checking `react-docgen-typescript` usage? I think we should, especially after the recent discussions we had about adoption.

Code after:
        features: {
          developmentModeForBuild: true,
          experimentalTestSyntax: true,
        },
      },
    },
    skipTasks: ['e2e-tests', 'bench'],
  },
  'react-webpack/18-ts': {
    name: 'React Latest (Webpack | TypeScript)',
    script: 'yarn create webpack5-react {{beforeDir}}',
    expected: {
      framework: '@storybook/react-webpack5',
      renderer: '@storybook/react',
      builder: '@storybook/builder-webpack5',
    },
    modifications: {
      useCsfFactory: true,
      extraDependencies: ['prop-types'],
      mainConfig: {
        features: {
          experimentalTestSyntax: true,
        },
        typescript: {
          reactDocgen: 'react-docgen-typescript',
        } as any, // the generic type does not contain the reactDocgen property
      },
    },
    skipTasks: ['e2e-tests', 'bench', 'vitest-integration'],
  },
  'react-webpack/17-ts': {
    name: 'React v17 (Webpack | TypeScript)',
    script:
      'yarn create webpack5-react {{beforeDir}} --version-react="17" --version-react-dom="17"',
    expected: {
      framework: '@storybook/react-webpack5',
      renderer: '@storybook/react',
      builder: '@storybook/builder-webpack5',
    },
    modifications: {
      useCsfFactory: true,
      extraDependencies: ['prop-types'],
      mainConfig: {
        features: {
          experimentalTestSyntax: true,
        },
      },
    },
    skipTasks: ['e2e-tests', 'bench', 'vitest-integration'],
  },
  'react-webpack/prerelease-ts': {