Convert storybook.js to TypeScript
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
const tsconfigPaths = require('vite-tsconfig-paths').default;
|
||||
const {
|
||||
mergeConfig
|
||||
} = require('vite');
|
||||
module.exports = {
|
||||
stories: ['../@(src|libs|apps)/**/*.@(mdx|stories.@(js|jsx|ts|tsx))'],
|
||||
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-a11y'],
|
||||
framework: {
|
||||
name: '@storybook/web-components-vite',
|
||||
options: {}
|
||||
},
|
||||
features: {
|
||||
previewMdx2: true,
|
||||
storyStoreV7: true
|
||||
},
|
||||
staticDirs: ['../public-assets'],
|
||||
async viteFinal(config, {
|
||||
configType
|
||||
}) {
|
||||
return mergeConfig(config, {
|
||||
// customize the Vite config here
|
||||
plugins: [tsconfigPaths()]
|
||||
});
|
||||
},
|
||||
docs: {
|
||||
autodocs: true
|
||||
}
|
||||
};
|
||||
21
src/Umbraco.Web.UI.Client/.storybook/main.ts
Normal file
21
src/Umbraco.Web.UI.Client/.storybook/main.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { StorybookConfig } from '@storybook/web-components-vite';
|
||||
|
||||
const config: StorybookConfig = {
|
||||
stories: ['../@(src|libs|apps)/**/*.stories.mdx', '../@(src|libs|apps)/**/*.stories.@(js|jsx|ts|tsx)'],
|
||||
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-a11y'],
|
||||
framework: {
|
||||
name: '@storybook/web-components-vite',
|
||||
options: {}
|
||||
},
|
||||
features: {
|
||||
storyStoreV7: true
|
||||
},
|
||||
staticDirs: ['../public-assets'],
|
||||
typescript: {
|
||||
check: true,
|
||||
},
|
||||
docs: {
|
||||
autodocs: true
|
||||
}
|
||||
};
|
||||
export default config;
|
||||
Reference in New Issue
Block a user