Anvil/.storybook/main.ts
André Jaenisch 41d82656b3
docs: add story for profile picture case
I also check for accessibility now.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:34 +02:00

43 lines
908 B
TypeScript

import { dirname, join, resolve } from 'node:path';
import type { StorybookConfig } from '@storybook/sveltekit';
import { mergeConfig } from 'vite';
const config: StorybookConfig = {
stories: ['../stories/**/*.mdx', '../stories/**/*.stories.ts'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y'
],
core: {
disableTelemetry: true
},
framework: {
name: '@storybook/sveltekit',
options: {}
},
docs: {
autodocs: 'tag'
},
async viteFinal(config) {
const allowFiles = config.server?.fs?.allow || [];
const storyFiles = resolve('stories');
return mergeConfig(config, {
alias: {
...config.alias,
$lib: resolve('..', 'src', 'lib')
},
server: {
...config.server,
fs: {
...config.server?.fs,
allow: [...allowFiles, storyFiles]
}
}
});
}
};
export default config;