yao-pkg / pkg

Package your Node.js project into an executable
https://www.npmjs.com/package/@yao-pkg/pkg
MIT License
395 stars 19 forks source link

fix: remove `is-core-module` dependency #77

Closed wojtekmaj closed 5 months ago

wojtekmaj commented 5 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.

This drops not one, but three dependencies from pkg, removing 70 KB of bloat: https://npmgraph.js.org/?q=is-core-module