e248e0073d
I had to downgrade Vite because the Storybook builder does not support v5 yet. Therefore this will be on a separate branch and updated as we move along with the codebase. Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
35 lines
759 B
TypeScript
35 lines
759 B
TypeScript
import { join, dirname } from 'node:path';
|
|
|
|
import type { StorybookConfig } from '@storybook/sveltekit';
|
|
import { mergeConfig } from 'vite';
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
addons: [
|
|
'@storybook/addon-links',
|
|
'@storybook/addon-essentials',
|
|
'@storybook/addon-interactions'
|
|
],
|
|
core: {
|
|
builder: '@storybook/builder-vite'
|
|
},
|
|
framework: {
|
|
name: '@storybook/sveltekit',
|
|
options: {}
|
|
},
|
|
docs: {
|
|
autodocs: 'tag'
|
|
},
|
|
async viteFinal(config) {
|
|
return mergeConfig(config, {
|
|
server: {
|
|
...config.server,
|
|
fs: {
|
|
...config.server.fs,
|
|
allow: [].concat(config.server.fs.allow || []).concat('stories')
|
|
}
|
|
}
|
|
});
|
|
}
|
|
};
|
|
export default config;
|