Skip to content

Commit 5f2605a

Browse files
committed
#780 Migrate Storybook to Vite build
1 parent 0e5f393 commit 5f2605a

6 files changed

Lines changed: 3654 additions & 6723 deletions

File tree

.storybook/main.js

Lines changed: 0 additions & 93 deletions
This file was deleted.

.storybook/main.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import type { StorybookConfig } from '@storybook/web-components-vite'
2+
import { mergeConfig } from 'vite'
3+
4+
const config: StorybookConfig = {
5+
stories: ['../src/**/*.stories.ts'],
6+
addons: [
7+
'@storybook/addon-links',
8+
'@storybook/addon-docs',
9+
],
10+
framework: '@storybook/web-components-vite',
11+
12+
async viteFinal (config) {
13+
return mergeConfig(config, {
14+
resolve: {
15+
dedupe: ['lit', 'lit-html', 'lit-element', '@lit/reactive-element'],
16+
},
17+
optimizeDeps: {
18+
include: ['lit/directive-helpers.js'],
19+
},
20+
})
21+
},
22+
}
23+
24+
export default config

.storybook/preview.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ if (typeof window !== 'undefined') {
1111
window.SolidLogic = solidLogic
1212
}
1313

14+
export const tags = ['autodocs']
1415
export const parameters = {}

0 commit comments

Comments
 (0)