Exemplo
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
Caso
- Objetivo
- 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
- Pacotes
- rollup 4.34.8 @rollup/plugin-commonjs 28.0.2
- Ambiente
- node
- Criado
- 2026-08-15T17:12:52Z
Contrato
- 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
Arquivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-15 · ed25519:d91480838ac982c9