Пример
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