2024-02-15 09:40:17 -05:00
|
|
|
import { dirname, join } from 'path';
|
2022-01-04 21:39:33 -05:00
|
|
|
const customConfig = require('../../../webpack.config.js');
|
2020-04-15 18:44:48 -04:00
|
|
|
|
2020-04-01 21:53:41 -04:00
|
|
|
module.exports = {
|
|
|
|
addons: [
|
2024-02-15 09:40:17 -05:00
|
|
|
getAbsolutePath('@storybook/addon-controls'),
|
|
|
|
getAbsolutePath('storybook-addon-jsx'),
|
|
|
|
getAbsolutePath('@storybook/addon-actions'),
|
|
|
|
getAbsolutePath('@storybook/addon-links'),
|
2020-04-01 21:53:41 -04:00
|
|
|
],
|
2024-02-15 09:40:17 -05:00
|
|
|
|
|
|
|
stories: ['../storybook/stories/**/*.stories.[tj]sx'],
|
|
|
|
|
2022-01-04 21:39:33 -05:00
|
|
|
webpackFinal: config => ({
|
|
|
|
...config,
|
|
|
|
module: {
|
|
|
|
...config.module,
|
|
|
|
rules: customConfig.module.rules,
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
...config.resolve,
|
|
|
|
...customConfig.resolve,
|
|
|
|
},
|
|
|
|
}),
|
2024-02-15 09:40:17 -05:00
|
|
|
|
2022-01-04 21:39:33 -05:00
|
|
|
typescript: {
|
|
|
|
reactDocgen: 'none',
|
2020-04-01 21:53:41 -04:00
|
|
|
},
|
2024-02-15 09:40:17 -05:00
|
|
|
|
|
|
|
framework: {
|
|
|
|
name: getAbsolutePath('@storybook/react-webpack5'),
|
|
|
|
options: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
docs: {
|
|
|
|
autodocs: false,
|
|
|
|
},
|
2020-04-01 21:53:41 -04:00
|
|
|
};
|
2024-02-15 09:40:17 -05:00
|
|
|
|
|
|
|
function getAbsolutePath(value) {
|
|
|
|
return dirname(require.resolve(join(value, 'package.json')));
|
|
|
|
}
|