We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a60237 commit acee410Copy full SHA for acee410
webpack.config.js
@@ -1,12 +1,25 @@
1
const path = require("path");
2
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
+
12
module.exports = {
13
entry: "./src/index.ts",
14
output: {
15
filename: "s3-upload-custom-resource.js",
16
path: path.resolve(__dirname, "dist"),
17
asyncChunks: false,
18
},
19
+ externals: {
20
+ ...getAwsSdkExternals(),
21
+ },
22
+ externalsType: "commonjs",
23
mode: "production",
24
target: "node",
25
module: {
0 commit comments