サンプル
Leaving the modules option unset in @babel/preset-env defaults to auto, preserving ESM syntax when caller.supportsStaticESM is true and converting to CommonJS when false.
sha256:0e5c41047e8f368cb12ecb51f5efc04ac1bc1078de279411af5aee5b26a6cb52
PUBLISHED
L3_CONTRACT_PASS
MIT-0
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- node
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- node
- 言語
- node
- パッケージマネージャー
- npm
検証実行環境
- 実行コンテキスト
- node 22
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- node 22
- 言語
- javascript
- パッケージマネージャー
- npm
- 実行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17
ケース
- ゴール
- Leaving the modules option unset in @babel/preset-env defaults to auto, preserving ESM syntax when caller.supportsStaticESM is true and converting to CommonJS when false. HOW
- パッケージ
-
@babel/preset-env 8.0.2
- 環境
- node
- 作成日
- 2026-08-17T06:38:17Z
よくある思い込み
@babel/preset-env defaults the modules option to commonjs, unconditionally transforming import statements into require calls regardless of caller capabilities.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- When the modules option is left unset, @babel/preset-env defaults to 'auto' and preserves static import and export declarations unchanged when caller.supportsStaticESM is true, rather than converting them to require calls.
- When the modules option is left unset with caller.supportsStaticESM set to false, @babel/preset-env transpiles ESM imports into CommonJS require calls and exports.
- Explicitly setting modules to 'commonjs' forces transformation to require calls even when caller.supportsStaticESM is true.
- Explicitly setting modules to false preserves ESM import statements even when caller.supportsStaticESM is false.
ファイル
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9