Skip to content

Commit

Permalink
feat: add storybook configs
Browse files Browse the repository at this point in the history
  • Loading branch information
florianstancioiu committed Apr 11, 2024
1 parent c5c4b35 commit 98857f9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .storybook/main.js
@@ -0,0 +1,20 @@
import esbuild from 'rollup-plugin-esbuild';

/** @type { import('@web/storybook-framework-web-components').StorybookConfig } */
const config = {
stories: ['../stories/**/*.stories.{js,ts,mdx}'],
addons: ['@storybook/addon-essentials', '@storybook/addon-links'],
framework: {
name: '@web/storybook-framework-web-components',
},
/* Try to make the build parse TS files */
async rollupFinal(config) {
// add extra configuration for rollup
// e.g. a new plugin
config.plugins.push(esbuild({}));

return config;
},
};

export default config;
6 changes: 3 additions & 3 deletions web-dev-server.config.mjs
@@ -1,6 +1,6 @@
import { storybookPlugin } from '@web/dev-server-storybook';
import cfg from '@neovici/cfg/web/dev-server.mjs';

export default {
plugins: [storybookPlugin({ type: 'web-components' })],
nodeResolve: true
...cfg,
plugins: [...cfg.plugins],
};

0 comments on commit 98857f9

Please sign in to comment.