Created
June 17, 2022 12:15
-
-
Save chientrm/034789e613569ce2924f9c08714f46e7 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'; | |
build({ | |
entryPoints: ['./index.js'], | |
bundle: true, | |
minify: true, | |
outfile: './build/index.js', | |
format: 'esm', | |
platform: 'node', | |
external: ['./handler.js'], | |
banner: { | |
js: "import { createRequire } from 'module';const require = createRequire(import.meta.url);" | |
} | |
}).catch((err) => { | |
process.stderr.write(err.stderr); | |
process.exit(1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment