Registry /
devops / storybook-addon-turbo-build
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Addon Configuration (String)
✓ module.exports = {
addons: [
"storybook-addon-turbo-build"
]
};
✗ import { configure } from 'storybook-addon-turbo-build';
The addon is configured as a string in `.storybook/main.js` and does not expose exportable symbols for direct JavaScript import.
Addon Configuration (Object with Options)
✓ module.exports = {
addons: [
{
name: "storybook-addon-turbo-build",
options: {
optimizationLevel: 2
}
}
]
};
✗ import turboBuild from 'storybook-addon-turbo-build';
// then use turboBuild in webpack config
Configuration with options is done via an object in `.storybook/main.js`. Options allow customizing optimizations like `optimizationLevel` or `esbuildMinifyOptions`.
This quickstart demonstrates how to install and configure `storybook-addon-turbo-build` in `.storybook/main.js` for a Storybook v6 project, including an example of custom options and a basic React story to illustrate context.
/* .storybook/main.js */
module.exports = {
stories: [
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
{
name: "storybook-addon-turbo-build",
options: {
optimizationLevel: 2, // Example: Increase optimization level
esbuildMinifyOptions: { // Example: Customize esbuild minification
target: "es2017",
minifyWhitespace: true
}
},
},
],
};
/* stories/Button.stories.jsx (example story) */
import React from 'react';
const Button = ({ children, onClick }) => (
<button type="button" onClick={onClick}>
{children}
</button>
);
export default {
title: 'Example/Button',
component: Button,
};
const Template = (args) => <Button {...args} />;
export const Primary = Template.bind({});
Primary.args = {
children: 'Primary Button',
onClick: () => console.log('Button clicked!')
};
Debug
Known issues
breakingThe `esbuildMinifyOptions.sourcemap` option was removed in version 2.0.0 due to an upgrade of `esbuild-loader` to v3. Using this option in v2.0.0 or later will lead to configuration errors.fixRemove `sourcemap` from your `esbuildMinifyOptions` configuration. Source map handling is now managed differently by `esbuild-loader`.
affects: >=2.0.0
breakingThis addon is explicitly incompatible with Storybook v7 and later versions. Storybook v7 and subsequent releases have integrated significant build performance improvements (e.g., Vite/webpack 5 integration) that supersede the functionality of this addon.fixDo not install or use `storybook-addon-turbo-build` with Storybook v7 or newer. Rely on Storybook's native performance enhancements. If using Storybook v6, ensure this addon is properly configured for that version.
affects: >=1.0.0 (when used with Storybook v7+)
gotchaThe performance benefits of `storybook-addon-turbo-build` are primarily observed during 'cold builds' (without cache). For builds with an existing `node_modules/.cache`, the performance difference might be barely noticeable. It is recommended to evaluate build times before and after integration to assess its real-world impact on your specific project.fixMeasure your Storybook build times (cold vs. warm) before and after integrating the addon using tools like `webpack-bundle-analyzer` or simple `time` commands to confirm its effectiveness for your workflow.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Addon storybook-addon-turbo-build is not installed or cannot be resolved. Make sure you've installed it.
The package `storybook-addon-turbo-build` has not been installed as a dev dependency in your project.
fixRun `npm install -D storybook-addon-turbo-build` or `yarn add -D storybook-addon-turbo-build` to install the addon.
TypeError: Cannot read properties of undefined (reading 'sourcemap') OR 'sourcemap' is not a valid esbuildMinifyOption
Attempting to use the `sourcemap` option within `esbuildMinifyOptions` in `storybook-addon-turbo-build` version 2.0.0 or higher, where it has been removed.
fixRemove the `sourcemap` key from your `esbuildMinifyOptions` object in `.storybook/main.js`. For example, change `{ target: 'es2015', sourcemap: false }` to `{ target: 'es2015' }`. Storybook build fails with errors related to Webpack configuration or 'esbuild-loader' on Storybook v7+
Using `storybook-addon-turbo-build` with Storybook v7 or a newer version, which is explicitly unsupported and causes compatibility issues with Storybook's updated build systems.
fixRemove `storybook-addon-turbo-build` from your `.storybook/main.js` configuration and uninstall the package. Storybook v7+ has native performance improvements that make this addon redundant and problematic.
Audit
Dependencies
No dependency data recorded yet.