From 2276842e0294a2b0a0fca8fa5688081a22863d43 Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Sun, 28 Jun 2026 16:18:45 -0400 Subject: [PATCH 1/2] maker function Minify configurable --- template.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/template.yaml b/template.yaml index c29b983..a98fa10 100644 --- a/template.yaml +++ b/template.yaml @@ -36,6 +36,11 @@ Parameters: Description: Enable source maps for debugging Default: false + EnableMinify: + Type: String + Description: Enable minification for the build + Default: true + Globals: Function: @@ -77,7 +82,7 @@ Resources: Metadata: BuildMethod: esbuild BuildProperties: - Minify: true + Minify: !Ref EnableMinify Target: "es2024" Format: "esm" MainFields: module,main # This is to help with ESM modules @@ -106,7 +111,7 @@ Resources: Metadata: BuildMethod: esbuild BuildProperties: - Minify: true + Minify: !Ref EnableMinify Target: "es2024" Format: "esm" MainFields: module,main # This is to help with ESM modules @@ -135,7 +140,7 @@ Resources: Metadata: BuildMethod: esbuild BuildProperties: - Minify: true + Minify: !Ref EnableMinify Target: "es2024" Format: "esm" MainFields: module,main # This is to help with ESM modules @@ -164,7 +169,7 @@ Resources: Metadata: BuildMethod: esbuild BuildProperties: - Minify: true + Minify: !Ref EnableMinify Target: "es2024" Format: "esm" MainFields: module,main # This is to help with ESM modules From 438e191aeef587fe9ca88cc14b3e7425c74ea86a Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Sun, 28 Jun 2026 17:46:44 -0400 Subject: [PATCH 2/2] Add note about setting EnableSourceMaps and EnableMinify --- template.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/template.yaml b/template.yaml index a98fa10..0abb59f 100644 --- a/template.yaml +++ b/template.yaml @@ -31,6 +31,8 @@ Parameters: Type: String Description: Cognito User Pool ARN + # NOTE: This project's `yarn run sam:build` doesn't handle cfn-parameters.json so if we want + # to change these values to effect the build we need to do it here. EnableSourceMaps: Type: String Description: Enable source maps for debugging