Skip to content

Commit acee410

Browse files
committed
Extern all @aws-sdk/client-*
1 parent 5a60237 commit acee410

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

webpack.config.js

+13
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
const path = require("path");
22

3+
function getAwsSdkExternals() {
4+
const packageJson = require("./package.json");
5+
return Object.fromEntries(
6+
Object.keys(packageJson["devDependencies"])
7+
.filter((key) => key.startsWith("@aws-sdk/client-"))
8+
.map((entry) => [entry, entry])
9+
);
10+
}
11+
312
module.exports = {
413
entry: "./src/index.ts",
514
output: {
615
filename: "s3-upload-custom-resource.js",
716
path: path.resolve(__dirname, "dist"),
817
asyncChunks: false,
918
},
19+
externals: {
20+
...getAwsSdkExternals(),
21+
},
22+
externalsType: "commonjs",
1023
mode: "production",
1124
target: "node",
1225
module: {

0 commit comments

Comments
 (0)