Storybook addon to transpile and bundle node_modules
Install Storybook and @newhighsco/storybook-addon-transpile-modules
:
yarn add -D storybook @newhighsco/storybook-addon-transpile-modules @storybook/react-webpack5
Create a .storybook/main.js
in your project:
// .storybook/main.js
/** @type { import('@storybook/react-webpack5').StorybookConfig } */
const config = {
framework: '@storybook/react-webpack5',
addons: [
{
name: '@newhighsco/storybook-addon-transpile-modules',
options: {
transpileModules: ['@newhighsco/chipset']
}
}
]
}
export default config