- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 151
Closed
Labels
Description
Describe the bug
Extra files (package.json to be exact) are not included into the final zips.
Versions (please complete the following information):
- OS: Mac
- Serverless Framework Version: 3.18.2
- Plugin Version: 1.30.0
Additional context
So basically I wanted to use esbuild with ESM (AWS supports this for a while already). I set the type inside package.json to module and everything else needed for this move, worked fine, but the problem I stumbled upon is that serverless-esbuild simply does not include the package.json into the zip even if it's added to the package.patterns like so below.
custom:
  esbuild:
    bundle: true
    minify: false
    packager: 'yarn'
    target: 'node16'
    keepOutputDirectory: true
package:
  individually: true
  excludeDevDependencies: true
  patterns:
    - 'package.json'
It looks like the .esbuild contains the the package.json, but the zips themselves don't.
Of course I could just name my files .mjs instead, but that isn't an ideal solution for me.