diff --git a/template.yaml b/template.yaml index c29b983..0abb59f 100644 --- a/template.yaml +++ b/template.yaml @@ -31,11 +31,18 @@ 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 Default: false + EnableMinify: + Type: String + Description: Enable minification for the build + Default: true + Globals: Function: @@ -77,7 +84,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 +113,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 +142,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 +171,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