Skip to content

Commit

Permalink
Omit package.json from lambda bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
printfn committed Oct 1, 2024
1 parent 0ab62cd commit 12ab6fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion telegram-bot/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ npm exec tsc
npm exec -- esbuild --bundle index.ts --outdir=dist --platform=node

rm -f lambda_package.zip
zip -j lambda_package.zip dist/index.js package.json package-lock.json
# don't include package.json because esbuild makes a CJS bundle that won't work if node finds `"type": "module"`
zip -j lambda_package.zip dist/index.js

0 comments on commit 12ab6fb

Please sign in to comment.