twenty/front/.storybook/main.js

33 lines
1.0 KiB
JavaScript
Raw Normal View History

module.exports = {
2023-04-11 00:31:55 +03:00
webpackFinal: config => {
config.module.rules.push({
test: /\.tsx?$/,
exclude: /node_modules/,
2023-04-11 00:31:55 +03:00
use: [{
loader: require.resolve('babel-loader'),
options: {
presets: [require('@babel/preset-typescript').default, [require('@babel/preset-react').default, {
runtime: 'automatic'
}], require('@babel/preset-env').default]
}
}]
});
config.resolve.extensions.push('.ts', '.tsx');
config.module.rules.push({
test: /\.mjs$/,
include: /node_modules/,
2023-04-11 00:31:55 +03:00
type: 'javascript/auto'
});
config.resolve.extensions.push('.mjs');
return config;
},
2023-04-11 00:31:55 +03:00
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-interactions", "@storybook/preset-create-react-app", '@storybook/addon-mdx-gfm'],
framework: {
name: '@storybook/react-webpack5',
options: {}
},
docs: {
autodocs: true
}
2023-04-11 00:31:55 +03:00
};