{"library":"storybook-addon-turbo-build","title":"Storybook Addon Turbo Build","type":"library","description":"storybook-addon-turbo-build is a Storybook addon designed to improve the build performance of Storybook v6 projects. It achieves this by modifying webpack configurations, primarily by replacing Terser with ESBuild for minification and optionally disabling source map generation. The current stable version is 2.0.1, which includes minor bug fixes. Major version 2.0.0 upgraded the underlying `esbuild-loader`. While it can significantly reduce cold build times (builds without `node_modules/.cache`), its impact on cache-enabled builds might be less noticeable, requiring users to evaluate its benefits for their specific workflow. The addon is explicitly incompatible with Storybook v7 and later versions, as those versions incorporate their own performance improvements (e.g., Vite integration, webpack 5), rendering this addon obsolete for newer Storybook setups. Its release cadence is tied to updates in its underlying dependencies like `esbuild-loader` and critical bug fixes for Storybook v6 compatibility.","language":"javascript","status":"deprecated","last_verified":"Sun Apr 19","install":{"commands":["npm install storybook-addon-turbo-build"],"cli":null},"imports":["module.exports = {\n  addons: [\n    \"storybook-addon-turbo-build\"\n  ]\n};","module.exports = {\n  addons: [\n    {\n      name: \"storybook-addon-turbo-build\",\n      options: {\n        optimizationLevel: 2\n      }\n    }\n  ]\n};"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/pocka/storybook-addon-turbo-build","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/storybook-addon-turbo-build","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"/* .storybook/main.js */\nmodule.exports = {\n  stories: [\n    \"../stories/**/*.stories.mdx\",\n    \"../stories/**/*.stories.@(js|jsx|ts|tsx)\",\n  ],\n  addons: [\n    \"@storybook/addon-links\",\n    \"@storybook/addon-essentials\",\n    {\n      name: \"storybook-addon-turbo-build\",\n      options: {\n        optimizationLevel: 2, // Example: Increase optimization level\n        esbuildMinifyOptions: { // Example: Customize esbuild minification\n          target: \"es2017\",\n          minifyWhitespace: true\n        }\n      },\n    },\n  ],\n};\n\n/* stories/Button.stories.jsx (example story) */\nimport React from 'react';\n\nconst Button = ({ children, onClick }) => (\n  <button type=\"button\" onClick={onClick}>\n    {children}\n  </button>\n);\n\nexport default {\n  title: 'Example/Button',\n  component: Button,\n};\n\nconst Template = (args) => <Button {...args} />;\n\nexport const Primary = Template.bind({});\nPrimary.args = {\n  children: 'Primary Button',\n  onClick: () => console.log('Button clicked!')\n};\n\n","lang":"javascript","description":"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}