floydspace / serverless-esbuild

💨 A Serverless framework plugin to bundle JavaScript and TypeScript with extremely fast esbuild
MIT License
445 stars 137 forks source link

Indirect dependency marked as external missing in package #511

Open jer-sen opened 9 months ago

jer-sen commented 9 months ago

Describe the bug My code import a module ssh2-sftp-client which has module ssh2 as a dependency which is listed in esbuild.config.ts externals (contains .node files). ssh2 is in .esbuild/.build folder but missing in final zip package.

To Reproduce Add dependencies ssh2-sftp-client and ssh2, add ssh2 to externals, and package a file importing ssh2-sftp-client.

Expected behavior ssh2 present in package.

Screenshots or Logs NA

Versions (please complete the following information):

Additional context Is ssh2 is imported from directly from the file importing ssh2-sftp-client, then everything is ok. That's my workaround...

a-r-d commented 4 months ago

ok im hitting this too now, externals is being ignored or something