| 45 | } |
| 46 | |
| 47 | async function buildExternalSdkFunction() { |
| 48 | const outbase = path.join(OUTDIR, "external"); |
| 49 | const outfile = path.join(outbase, "index.mjs"); |
| 50 | |
| 51 | await esbuild.build({ |
| 52 | entryPoints: { |
| 53 | index: "src/non-included-sdk.mjs", |
| 54 | }, |
| 55 | logLevel: "info", |
| 56 | platform: "browser", |
| 57 | target: "es2023", |
| 58 | format: "esm", |
| 59 | bundle: true, |
| 60 | minify: true, |
| 61 | sourcemap: false, |
| 62 | outfile, |
| 63 | external: [ |
| 64 | "@smithy", |
| 65 | "@aws-sdk/core", |
| 66 | "@aws-sdk/util-user-agent-browser", |
| 67 | "@aws-crypto", |
| 68 | "bowser", |
| 69 | ], |
| 70 | }); |
| 71 | } |
| 72 | |
| 73 | await buildReact(); |
| 74 | await buildExternalSdkFunction(); |