squiggle/packages/components/.storybook/main.js

32 lines
971 B
JavaScript
Raw Permalink Normal View History

2022-02-27 04:41:30 +00:00
//const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
const custom = require('../webpack.config.js');
2022-02-27 04:41:30 +00:00
module.exports = {
webpackFinal: async (config) => {
config.resolve.alias = custom.resolve.alias;
2022-04-04 04:53:55 +00:00
return { ...config, module: { ...config.module, rules: config.module.rules.concat(custom.module.rules.filter(x => x.loader === "ts-loader")) } };
},
2022-02-27 04:41:30 +00:00
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/preset-create-react-app"
],
"framework": "@storybook/react",
"core": {
"builder": "webpack5"
},
typescript: {
check: false,
checkOptions: {},
reactDocgen: 'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
},
},
2022-02-27 04:41:30 +00:00
}