21a7fc1b54
I also extracted the Icons we use into a story and looked into how I could potentially allow for changing the locale. Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
44 lines
938 B
TypeScript
44 lines
938 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-a11y',
|
|
'@storybook/addon-essentials',
|
|
'@storybook/addon-links',
|
|
'@storybook/addon-interactions',
|
|
'@storybook/addon-toolbar'
|
|
],
|
|
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;
|