storybook/docs/snippets/common/storybook-vite-builder-svelte-plugin.js.mdx
2022-11-17 16:33:22 +01:00

28 lines
623 B
Plaintext

```js
// .storybook/main.js|ts
const preprocess = require('svelte-preprocess');
module.exports = {
stories: ['../stories/**/*.stories.mdx', '../stories/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
core: {
builder: '@storybook/builder-vite',
},
async viteFinal(config, { configType }) {
// Customize the Vite config here
return config;
},
framework: {
name: '@storybook/svelte-webpack5',
options: {
preprocess: preprocess({
typescript: true,
postcss: true,
sourceMap: true,
}),
},
},
};
```