## Current Behavior We currently do not have support for Storybook 9, nor any migrations to help users switch to it. ## Expected Behavior Support Storybook 9 and add a migration for users to switch to v9 BREAKING CHANGE: Remove deprecated generators: `@nx/storybook:cypress-project`, `@nx/react-native:storybook-configuration`, `@nx/react-native:stories`, `@nx/react-native:component-story`
30 lines
832 B
TypeScript
30 lines
832 B
TypeScript
/* eslint-disable @nx/enforce-module-boundaries */
|
|
import type { StorybookConfig } from '@storybook/react-vite';
|
|
import { mergeConfig } from 'vite';
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../src/lib/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
|
|
addons: ['@storybook/addon-docs'],
|
|
|
|
framework: {
|
|
name: '@storybook/react-vite',
|
|
options: {},
|
|
},
|
|
|
|
viteFinal: async (config) => {
|
|
const {
|
|
nxViteTsPaths,
|
|
// nx-ignore-next-line
|
|
} = require('@nx/vite/plugins/nx-tsconfig-paths.plugin');
|
|
return mergeConfig(config, { plugins: [nxViteTsPaths()] });
|
|
},
|
|
|
|
docs: {},
|
|
};
|
|
|
|
export default config;
|
|
|
|
// To customize your Vite configuration you can use the viteFinal field.
|
|
// Check https://storybook.js.org/docs/react/builders/vite#configuration
|
|
// and https://nx.dev/recipes/storybook/custom-builder-configs
|