codesamplex

Sample

Importing the default export of a CommonJS module with exports.default returns the entire module.exports object unless exports.__esModule is set or defaultIsModuleExports is configured.

sha256:38845162824e7e10f81dba9d9e478a2c987a2a1f19c3dcc6851d4a01241065dd

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Importing the default export of a CommonJS module with exports.default returns the entire module.exports object unless exports.__esModule is set or defaultIsModuleExports is configured. HOW
Packages
@rollup/plugin-commonjs 29.0.3 rollup 4.62.4
Environment
node
Created
2026-08-16T15:53:03Z

Commonly assumed

When an ES module imports a CommonJS module that defines exports.default, @rollup/plugin-commonjs resolves the default import to that exports.default value.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts