twenty/front/.storybook/main.ts
Charles Bochet f935a6b723
Re-write test with storybook testing library (#150)
* Re-write test with storybook testing library

* Update CI
2023-05-29 11:02:38 +02:00

36 lines
1017 B
TypeScript

module.exports = {
webpackFinal: config => {
config.module.rules.push({
test: /\.tsx?$/,
exclude: /node_modules/,
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/,
type: 'javascript/auto'
});
config.resolve.extensions.push('.mjs');
return config;
},
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/preset-create-react-app",
"@storybook/addon-coverage"
],
framework: {
name: '@storybook/react-webpack5',
options: {}
},
};