serverless-esbuild icon indicating copy to clipboard operation
serverless-esbuild copied to clipboard

pnpm: external modules bundled without their nested modules.

Open UROjQ6r80p opened this issue 1 year ago • 3 comments

External modules are bundled without their dependencies.

Example serverless.yml:

custom:
  esbuild:
    packager: pnpm
    external:
      - '@sparticuz/chromium'

module @sparticuz/chromium has dependencies:

  "dependencies": {
    "follow-redirects": "^1.15.3",
    "tar-fs": "^3.0.4"
  }

They are not included after command pnpm exec serverless package: image

To Reproduce Minimal repo to reproduce: https://github.com/UROjQ6r80p/serverless-esbuild-pnpm-no-nested-dependencies/tree/main

Expected behavior Dependencies of modules to be bundled together.

Versions (please complete the following information):

  • OS: Windows 10
  • Serverless Framework Version: 3.38.0
  • Plugin Version: 1.49.0

UROjQ6r80p avatar Nov 29 '23 22:11 UROjQ6r80p

+1

dvictory avatar Dec 01 '23 21:12 dvictory

hey @dvictory thank you for raising it, currently, pnpm is not really reliable, so please keep an eye on this issue https://github.com/floydspace/serverless-esbuild/issues/506 it addresses that pnpm support must be adjusted

floydspace avatar Dec 04 '23 12:12 floydspace

+1

mokone91 avatar Jun 13 '24 10:06 mokone91