eslint prefer-node-protoco 即 import { resolve } from 'node:path' 类似这种,使用 `node:` 前缀的原因

node: protocol is available as of Node.js 14.18.0 LTS.
Since we are dropping support for all Node.js versions below that,
we can takeadvantage of this prefix to help differentiate built-in modules from npmmodules.

我们采用 node: 这个前缀的优点:有助于区分内置模块和 npm模块。

posted @ 2024-06-21 23:32  龙陌  阅读(2)  评论(0编辑  收藏  举报