--import=module
稳定性: 1 - 实验性的
¥Stability: 1 - Experimental
在启动时预加载指定的模块。如果多次提供该标志,则每个模块将按照它们出现的顺序依次执行,从 NODE_OPTIONS
中提供的模块开始。
¥Preload the specified module at startup. If the flag is provided several times,
each module will be executed sequentially in the order they appear, starting
with the ones provided in NODE_OPTIONS
.
遵循 ECMAScript 模块 解析规则。使用 --require
加载 CommonJS 模块。预加载 --require
的模块将在预加载 --import
的模块之前运行。
¥Follows ECMAScript module resolution rules.
Use --require
to load a CommonJS module.
Modules preloaded with --require
will run before modules preloaded with --import
.