Parent: main.js|ts configuration
Type: (string | { from: string; to: string })[]
(string | { from: string; to: string })[]
Sets a list of directories of static files to be loaded by Storybook.
export default { // Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite) framework: '@storybook/your-framework', stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], staticDirs: ['../public', '../static'], };
You can also use a configuration object to define the directories:
export default { // Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite) framework: '@storybook/your-framework', stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], staticDirs: [{ from: '../my-custom-assets/images', to: '/assets' }], };