create-react-component-library/.storybook/main.js

33 lines
897 B
JavaScript
Raw Normal View History

2022-05-30 12:46:55 -06:00
const path = require('path');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = {
2023-03-28 17:36:47 -06:00
"stories": ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
2023-04-14 09:00:02 -06:00
"addons": ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-interactions", "@storybook/preset-scss"],
2022-05-30 12:46:55 -06:00
"webpackFinal": async config => {
2023-03-28 17:36:47 -06:00
config.resolve.alias = {
...config.resolve.alias,
2022-05-30 12:46:55 -06:00
'@components': path.resolve(__dirname, "../src/components/")
};
config.resolve.plugins = [new TsconfigPathsPlugin()];
return config;
},
2023-03-28 17:36:47 -06:00
"framework": {
name: "@storybook/react-webpack5",
options: {}
2022-05-30 12:46:55 -06:00
},
typescript: {
reactDocgenTypescriptOptions: {
compilerOptions: {
"paths": {
2023-03-28 17:36:47 -06:00
"@Components/*": ["Components/*"]
}
2022-05-30 12:46:55 -06:00
}
}
},
features: {
2023-03-28 17:36:47 -06:00
previewMdx2: true
},
2023-03-28 17:36:47 -06:00
docs: {
autodocs: true
}
};