docs/_snippets/storybook-main-simplified-config.md
export default {
// Replace your-framework with the framework you are using, e.g. react-webpack5, nextjs, angular, etc.
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
webpackFinal: async (config) => {
config.plugins.push(/* ... */);
return config;
},
};
// Replace your-framework with the framework you are using, e.g. react-webpack5, nextjs, angular, etc.
import type { StorybookConfig } from '@storybook/your-framework';
const config: StorybookConfig = {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
webpackFinal: async (config) => {
config.plugins.push(/* ... */);
return config;
},
};
export default config;
// Replace your-framework with the framework you are using, e.g. react-webpack5, nextjs, etc.
import { defineMain } from '@storybook/your-framework/node';
export default defineMain({
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
webpackFinal: async (config) => {
config.plugins.push(/* ... */);
return config;
},
});
// Replace your-framework with the framework you are using, e.g. react-webpack5, nextjs, etc.
import { defineMain } from '@storybook/your-framework/node';
export default defineMain({
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
webpackFinal: async (config) => {
config.plugins.push(/* ... */);
return config;
},
});
import { defineMain } from '@storybook/angular/node';
export default defineMain({
framework: '@storybook/angular',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
webpackFinal: async (config) => {
config.plugins.push(/* ... */);
return config;
},
});