yao-pkg / pkg

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

fix: over extracting native modules with pnpm #14

Closed segevfiner closed 8 months ago

segevfiner commented 8 months ago

pnpm results in bundling paths like /snapshot/node_modules/.pnpm/foobar@0.1.0/node_modules/foobar/build/Release/foobar.node

So use the last node_modules instead of the first to figure out what to extract so as to not extract the entire .pnpm folder.

Contributed on behalf of Swimm