In order to make the storybook visible to everyone. Some changes had to be made to make index.scss compiled with the rest of the codebase, it had to be imported from preview.js, not directly from preview.html.
32 lines
760 B
JavaScript
32 lines
760 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',
|
|
],
|
|
'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;
|
|
},
|
|
}; |