mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 23:21:15 +08:00
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
const sveltePreprocess = require('svelte-preprocess');
|
|
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
stories: ['../src/stories/**/*.stories.@(ts|tsx|js|jsx||mdx|svelte)'],
|
|
logLevel: 'debug',
|
|
svelteOptions: {
|
|
preprocess: sveltePreprocess(),
|
|
},
|
|
addons: [
|
|
'@storybook/addon-storysource',
|
|
'@storybook/addon-actions',
|
|
{
|
|
name: '@storybook/addon-docs',
|
|
options: {
|
|
configureJSX: true,
|
|
},
|
|
},
|
|
'@storybook/addon-controls',
|
|
'@storybook/addon-interactions',
|
|
'@storybook/addon-links',
|
|
'@storybook/addon-backgrounds',
|
|
'@storybook/addon-viewport',
|
|
'@storybook/addon-a11y',
|
|
],
|
|
webpackFinal: async (config) => {
|
|
config.module.rules.push({
|
|
test: [/\.stories\.js$/, /index\.js$/],
|
|
use: [require.resolve('@storybook/source-loader')],
|
|
include: [path.resolve(__dirname, '../src')],
|
|
enforce: 'pre',
|
|
});
|
|
return config;
|
|
},
|
|
core: {
|
|
channelOptions: { allowFunction: false, maxDepth: 10 },
|
|
disableTelemetry: true,
|
|
},
|
|
staticDirs: ['../public'],
|
|
features: {
|
|
breakingChangesV7: true,
|
|
},
|
|
framework: '@storybook/svelte-webpack5',
|
|
};
|