Anvil/.storybook/main.ts

36 lines
762 B
TypeScript
Raw Normal View History

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;