2023-01-04 15:52:24 +01:00
|
|
|
const viteTsconfig = require('vite-tsconfig-paths');
|
|
|
|
|
const tsconfigPaths = viteTsconfig.default;
|
|
|
|
|
const { mergeConfig } = require('vite');
|
|
|
|
|
|
2022-12-01 12:05:22 +01:00
|
|
|
module.exports = {
|
2023-01-20 12:06:18 +01:00
|
|
|
'stories': [
|
|
|
|
|
'../src/**/*.stories.mdx',
|
|
|
|
|
'../src/**/*.stories.@(js|jsx|ts|tsx)',
|
2022-12-01 12:05:22 +01:00
|
|
|
],
|
2023-01-20 12:06:18 +01:00
|
|
|
'addons': [
|
|
|
|
|
'@storybook/addon-links',
|
|
|
|
|
'@storybook/addon-essentials',
|
|
|
|
|
'@storybook/addon-interactions',
|
2023-02-23 16:16:00 +01:00
|
|
|
'@storybook/addon-a11y',
|
2023-03-07 17:06:50 +01:00
|
|
|
'@storybook/preset-scss'
|
2022-12-01 12:05:22 +01:00
|
|
|
],
|
2023-01-20 12:06:18 +01:00
|
|
|
'framework': '@storybook/react',
|
|
|
|
|
'core': {
|
|
|
|
|
'builder': '@storybook/builder-vite',
|
2022-12-01 12:05:22 +01:00
|
|
|
},
|
|
|
|
|
staticDirs: [
|
2023-01-20 12:06:18 +01:00
|
|
|
'../src',
|
2022-12-01 12:05:22 +01:00
|
|
|
],
|
2023-01-20 12:06:18 +01:00
|
|
|
'features': {
|
|
|
|
|
'storyStoreV7': true,
|
2023-01-04 15:52:24 +01:00
|
|
|
},
|
|
|
|
|
async viteFinal(config) {
|
2023-01-20 12:06:18 +01:00
|
|
|
const finalConfig = mergeConfig(config, {
|
2023-01-04 15:52:24 +01:00
|
|
|
plugins: [tsconfigPaths()],
|
|
|
|
|
});
|
2023-01-20 12:06:18 +01:00
|
|
|
finalConfig.base = 'https://openfun.github.io/cunningham';
|
|
|
|
|
return finalConfig;
|
2023-01-04 15:52:24 +01:00
|
|
|
},
|
2023-02-23 16:16:00 +01:00
|
|
|
};
|