Closed wojtekmaj closed 2 months ago
Follow-up after answer in https://github.com/yao-pkg/pkg/discussions/76.
Node.js from v6.13.0, v8.10.0, v9.3.0 includes module.builtinModules which we can use to natively check if some module belongs to Node.js core or not.
module.builtinModules
This drops not one, but three dependencies from pkg, removing 70 KB of bloat: https://npmgraph.js.org/?q=is-core-module
pkg
Follow-up after answer in https://github.com/yao-pkg/pkg/discussions/76.
Node.js from v6.13.0, v8.10.0, v9.3.0 includes
module.builtinModules
which we can use to natively check if some module belongs to Node.js core or not.This drops not one, but three dependencies from
pkg
, removing 70 KB of bloat: https://npmgraph.js.org/?q=is-core-module