Created
November 26, 2021 20:09
-
-
Save mxro/03a0e05268c10cb1c2bdcd96980fc993 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { build } from 'esbuild'; | |
import { pnpPlugin } from '@yarnpkg/esbuild-plugin-pnp'; | |
build({ | |
plugins: [pnpPlugin()], | |
bundle: true, | |
entryPoints: ['src/lambda.ts'], | |
external: ['aws-sdk'], | |
minify: true, | |
format: 'cjs', | |
target: 'node12.0', | |
sourcemap: true, | |
outfile: 'distLambda/lambda.js', | |
}).catch((e) => { | |
console.log('Build not successful', e.message); | |
process.exit(1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment