storybook/webpack.config.js
const webpack = require('webpack')/** * @param {{ config: webpack.Configuration}} options */Function `exports` has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.module.exports = ({ config }) => { if (config.module && config.module.rules) { config.module.rules.push({ test: /\.(ts|tsx)$/, loader: require.resolve('babel-loader'), }) } else { throw new Error('Unable to load TS loader') } if (config.resolve && config.resolve.extensions) { config.resolve.extensions.push('.ts', '.tsx') } else { throw new Error('Unable to load TS extensions') } return config}