canirequire

canirequireDual (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.

Latest
7.6.17 (Feb 20, 2024)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
7.6.17
Native ESM since
7.0.0
TypeScript types
Bundled
Node engines
not declared
License
MIT

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.

Runtimerequire("@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).

VersionsFormatFirst published
7.0.13 – 7.6.24Dual (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

Similar popularity