-C 条件, --conditions=条件
🌐 -C condition, --conditions=condition
稳定性: 1 - 实验性
启用对自定义 条件导出 分辨率条件的实验性支持。
🌐 Enable experimental support for custom conditional exports resolution conditions.
允许任意数量的自定义字符串条件名称。
🌐 Any number of custom string condition names are permitted.
默认的 Node.js 条件 "node"、"default"、"import" 和 "require" 将始终按定义应用。
🌐 The default Node.js conditions of "node", "default", "import", and
"require" will always apply as defined.
例如,要以“开发”配置运行一个模块:
🌐 For example, to run a module with "development" resolutions:
$ node -C development app.js