示例
Marking a transpiled CommonJS dependency as external in Rollup silently breaks default imports in CJS output unless output.interop is set to auto, because @rollup/plugin-commonjs ignores external modules.
sha256:6bd9e4aeb00bbe86cb0245f6c6955ae8ec7421dba24da3b8401f6307646e0ad8
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Marking a transpiled CommonJS dependency as external in Rollup silently breaks default imports in CJS output unless output.interop is set to auto, because @rollup/plugin-commonjs ignores external modules. HOW
- 包
- rollup 4.34.8 @rollup/plugin-commonjs 28.0.2
- 环境
- node
- 创建时间
- 2026-08-15T17:12:52Z
契约
- assert @rollup/plugin-commonjs emits default import without helper synthesis for external CJS require in ESM output
- assert Rollup default interop leaves transpiled external CJS default export wrapped in __esModule object in CJS output
- assert output.interop 'auto' generates _interopDefault and properly unwraps default export at runtime
- assert Rollup preserves verbatim named ESM import for external CJS dependencies in ESM output
文件
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-15 · ed25519:d91480838ac982c9