Files
cunningham/packages/react/.storybook/main.cjs
jbpenrath 0274534234 (react) install storybook-a11y-addon
We need to ensure that our components are accessible. In order to ease
this task, we decide to install this package to display an a11y report
for each component into the storybook interface. In this way, developer
can check if the component it is developing violates or miss so a11y
rules.
2023-02-28 10:29:23 +01:00

34 lines
790 B
JavaScript

const viteTsconfig = require('vite-tsconfig-paths');
const tsconfigPaths = viteTsconfig.default;
const { mergeConfig } = require('vite');
module.exports = {
'stories': [
'../src/**/*.stories.mdx',
'../src/**/*.stories.@(js|jsx|ts|tsx)',
],
'addons': [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
],
'framework': '@storybook/react',
'core': {
'builder': '@storybook/builder-vite',
},
staticDirs: [
'../src',
],
'features': {
'storyStoreV7': true,
},
async viteFinal(config) {
const finalConfig = mergeConfig(config, {
plugins: [tsconfigPaths()],
});
finalConfig.base = 'https://openfun.github.io/cunningham';
return finalConfig;
},
};