import mdx from 'vite-plugin-mdx' ; import { createCompiler } from '@storybook/csf-tools/mdx' ; see https export function mdxPlugin ( ) { return mdx ( ( filename ) => { const compilers = [ ] ; if ( filename . includes ( '.stories.' ) ) { compilers . push ( createCompiler ( { } ) ) ; } return { compilers , } ; } ) ; }