canirequire › Dual (CommonJS + ESM) › @storybook/addons
Is @storybook/addons ESM-only? Can you require() it?
Storybook addons store
Last verified Sep 9, 2026 against @storybook/addons@7.6.17. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
@storybook/addons publishes both a CommonJS entry and a native ESM entry (ESM added in 7.0.0). require("@storybook/addons") and import "@storybook/addons" both work on every supported Node.js version and in Bun.
Does @storybook/addons@7.6.17 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@storybook/addons") from a CommonJS file and import "@storybook/addons" from an ES module.
| Runtime | require("@storybook/addons") | import "@storybook/addons" |
|---|---|---|
| Node.js 18 | ✓ works | ✓ works |
| Node.js 20 | ✓ works | ✓ works |
| Node.js 22 | ✓ works | ✓ works |
| Node.js 24 | ✓ works | ✓ works |
| Node.js 26 | ✓ works | ✓ works |
| Bun 1.4 | ✓ works | ✓ works |
How to import @storybook/addons
ES modules (import)
import addons from "@storybook/addons";CommonJS (require)
const addons = require("@storybook/addons");Module format by version
Derived from the type, main and exports fields of every stable release on npm (312 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 7.0.13 – 7.6.24 | Dual (CommonJS + ESM) | May 22, 2023 |
Frequently asked
Is @storybook/addons ESM-only?
@storybook/addons@7.6.17 ships CommonJS and ESM builds. @storybook/addons publishes both a CommonJS entry and a native ESM entry (ESM added in 7.0.0). require("@storybook/addons") and import "@storybook/addons" both work on every supported Node.js version and in Bun.
Can I require @storybook/addons?
Yes. @storybook/addons ships a CommonJS entry, so require("@storybook/addons") works on every Node.js version, alongside the native ESM entry for import.
Does @storybook/addons work in Bun?
Yes. import "@storybook/addons" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does @storybook/addons ship TypeScript types?
Yes. @storybook/addons bundles its own type declarations; no @types package is needed.
Links
Other dual (commonjs + esm) packages
- minimatch 10.2.6Dual
- brace-expansion 5.0.9Dual
- lru-cache 11.5.2Dual
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
- js-yaml 5.4.1Dual
Similar popularity
- @fortawesome/fontawesome-svg-core 7.3.1Dual
- @rollup/plugin-alias 6.0.0ESM-only
- @fortawesome/free-solid-svg-icons 7.3.1Dual
- @semantic-release/npm 13.1.5ESM-only
- @semantic-release/commit-analyzer 13.0.1ESM-only
- @semantic-release/github 12.0.9ESM-only
- @storybook/react-webpack5 10.6.0No entry
- @angular/cli 22.1.7CommonJS