canirequire

canirequireCommonJS › @storybook/manager-webpack5

Is @storybook/manager-webpack5 ESM-only? Can you require() it?

Storybook framework-agnostic API

Last verified Sep 9, 2026 against @storybook/manager-webpack5@6.5.16. JSON

CommonJS CommonJS — require() works on every Node.js version

@storybook/manager-webpack5 ships CommonJS only. require("@storybook/manager-webpack5") works everywhere. import "@storybook/manager-webpack5" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

It also declares a "module" field, so bundlers such as webpack, Vite and esbuild pick up an ESM build for tree-shaking.

Latest
6.5.16 (Jan 26, 2023)
Module format
CommonJS
Last CommonJS version
6.5.16
TypeScript types
Bundled
Node engines
not declared
License
MIT

Does @storybook/manager-webpack5@6.5.16 actually load? Runtime test results

Installed and executed on Sep 9, 2026 with require("@storybook/manager-webpack5") from a CommonJS file and import "@storybook/manager-webpack5" from an ES module.

Runtimerequire("@storybook/manager-webpack5")import "@storybook/manager-webpack5"
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/manager-webpack5

ES modules (import)

import managerWebpack5 from "@storybook/manager-webpack5";

Named imports from a CommonJS package only work when Node.js can statically detect them. If a named import fails, use the default import and destructure.

CommonJS (require)

const managerWebpack5 = require("@storybook/manager-webpack5");

Module format by version

Derived from the type, main and exports fields of every stable release on npm (51 versions; the newest 51 shown).

VersionsFormatFirst published
6.3.0 – 6.5.16CommonJSJun 23, 2021

Frequently asked

Is @storybook/manager-webpack5 ESM-only?

@storybook/manager-webpack5@6.5.16 is a CommonJS package. @storybook/manager-webpack5 ships CommonJS only. require("@storybook/manager-webpack5") works everywhere. import "@storybook/manager-webpack5" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

Can I import @storybook/manager-webpack5 with ES module syntax?

Yes. import managerWebpack5 from "@storybook/manager-webpack5" works in Node.js and Bun because they support importing CommonJS modules. Named imports work only when Node.js can statically detect the exports.

Does @storybook/manager-webpack5 work in Bun?

Yes. import "@storybook/manager-webpack5" loaded successfully in Bun 1.4 on Sep 9, 2026.

Does @storybook/manager-webpack5 ship TypeScript types?

Yes. @storybook/manager-webpack5 bundles its own type declarations; no @types package is needed.

Links

Other commonjs packages

Similar popularity