1.0.0 • Published 8 years ago
antiaris-node-resolve v1.0.0
antiaris-node-resolve
解析文件依赖,找到真正的 CommonJS 指向。这在复用被发布到 NPM 上的资源时非常有用。
import {resolve} from 'antiaris-node-resolve';
resolve('src/index.js', './foo/foo');// src/foo/foo.js
resolve('src/index.js', 'babel-core');// node_modules/babel-core/index.js
默认地,NodeJS 内建的模块会被忽略,比如 fs
、path
。
1.0.0
8 years ago