Skip to content

Commit 47210c4

Browse files
committed
fix minifying changing the name of handler which needs to stay
1 parent 9d844ea commit 47210c4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/plugin.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ export const CloudFrontFunctionsPlugin = (): Plugin => ({
2222
build.initialOptions.target = "es5"
2323
build.initialOptions.format = "cjs"
2424

25+
if (build.initialOptions.minify) {
26+
build.initialOptions.minify = false
27+
build.initialOptions.minifyIdentifiers = false
28+
build.initialOptions.minifyWhitespace = true
29+
build.initialOptions.minifySyntax = true
30+
}
31+
2532
build.initialOptions.supported = {
2633
...config,
2734
...build.initialOptions.supported,

0 commit comments

Comments
 (0)