aws-amplify warning after updating angular application to the latest version 10.0

I have updated the angular application to the latest version, and keep getting the warning message from the @aws-amplify. I know angular 10 doesn’t remend to use commonjs. Since the @aws-amplify is on that, how can I remove the warning?

I tried adding allowedCommonJsDependencies in angular.json

 "allowedCommonJsDependencies": [
          "crypto-js", "@aws-sdk/eventstream-marshaller", "buffer", "js-cookie", 
          "@aws-crypto", "zen-observable", "@aws-sdk/util-utf8-node", "@aws-crypto/sha256-js", "@aws-sdk/util-buffer-from",
          "@aws-sdk/smithy-client", "@aws-sdk/middleware-serde", "@aws-sdk/middleware-user-agent",
          "@aws-sdk/middleware-retry", "@aws-sdk/middleware-signing", "@aws-sdk/middleware-content-length",
          "@aws-sdk/middleware-host-header", "@aws-sdk/config-resolver", "@aws-sdk/s3-request-presigner",
          "@aws-sdk/util-format-url", "@aws-sdk/util-create-request", "@aws-sdk/property-provider",
          "axios", "@aws-sdk/fetch-http-handler", "@aws-sdk/protocol-http", "@aws-sdk/querystring-builder",
          "@aws-sdk/util-utf8-browser", "@aws-sdk/url-parser-browser", "@aws-crypto/sha256-browser",
          "@aws-sdk/url-parser-node", "@aws-sdk/util-uri-escape", "@aws-sdk/middleware-sdk-s3",
          "@aws-sdk/middleware-bucket-endpoint", "@aws-sdk/querystring-parser", "@aws-sdk/middleware-apply-body-checksum",
          "@aws-sdk/middleware-ssec", "@aws-sdk/middleware-expect-continue", "fast-xml-parser",
          "@aws-sdk/xml-builder", "@aws-sdk/md5-js", "@aws-sdk/hash-blob-browser",
          "@aws-sdk/eventstream-serde-browser", "@aws-sdk/middleware-location-constraint", "uuid",
          "@aws-sdk/credential-provider-cognito-identity", "@aws-sdk/eventstream-serde-config-resolver",
          "@aws-sdk/client-s3","@aws-sdk/client-pinpoint",
          "ulid", "zen-push", "lodash", "@aws-amplify/core", "@aws-amplify/analytics","@aws-amplify/ui-components"
          ]

warnings

WARNING in /Users/macbook/Projects/src/app/shared/components/forms/datepicker/datepicker.component.ts depends on 'inputmask'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/src/app/shared/directives/multi-select.directive.ts depends on 'util'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/src/app/shared/directives/duration.directive.ts depends on 'moment-timezone'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-amplify/ui-components/dist/esm/loader.mjs depends on '@aws-amplify/core'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-amplify/datastore/lib-esm/datastore/datastore.js depends on 'uuid'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-amplify/analytics/lib-esm/Providers/AWSPinpointProvider.js depends on 'uuid'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-amplify/analytics/lib-esm/Providers/AmazonPersonalizeProvider.js depends on 'lodash/isEmpty'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-amplify/analytics/lib-esm/Providers/AmazonPersonalizeProvider.js depends on 'lodash/isEqual'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-amplify/analytics/lib-esm/Providers/AmazonPersonalizeProvider.js depends on 'lodash/get'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/amazon-cognito-identity-js/es/CognitoUser.js depends on 'buffer'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/amazon-cognito-identity-js/es/AuthenticationHelper.js depends on 'crypto-js/hmac-sha256'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/amazon-cognito-identity-js/es/AuthenticationHelper.js depends on 'crypto-js/lib-typedarrays'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/zen-observable-ts/lib/bundle.esm.js depends on 'zen-observable'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-amplify/analytics/lib-esm/Providers/AWSKinesisFirehoseProvider.js depends on '@aws-sdk/util-utf8-browser'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/amazon-cognito-identity-js/es/CookieStorage.js depends on 'js-cookie'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-amplify/storage/lib-esm/providers/AWSS3Provider.js depends on '@aws-sdk/s3-request-presigner'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-amplify/storage/lib-esm/providers/AWSS3Provider.js depends on '@aws-sdk/util-format-url'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-amplify/storage/lib-esm/providers/AWSS3Provider.js depends on '@aws-sdk/util-create-request'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/amazon-cognito-identity-js/es/Client.js depends on 'isomorphic-unfetch'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-lex-runtime-service/dist/es/commands/DeleteSessionCommand.js depends on '@aws-sdk/smithy-client'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-pinpoint/dist/es/PinpointClient.js depends on '@aws-sdk/middleware-signing'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-pinpoint/dist/es/PinpointClient.js depends on '@aws-sdk/middleware-user-agent'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-pinpoint/dist/es/PinpointClient.js depends on '@aws-sdk/middleware-retry'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-pinpoint/dist/es/PinpointClient.js depends on '@aws-sdk/middleware-host-header'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-pinpoint/dist/es/PinpointClient.js depends on '@aws-sdk/config-resolver'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-pinpoint/dist/es/PinpointClient.js depends on '@aws-sdk/middleware-content-length'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-pinpoint/dist/es/commands/UpdateEndpointsBatchCommand.js depends on '@aws-sdk/middleware-serde'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-s3/dist/es/commands/UploadPartCopyCommand.js depends on '@aws-sdk/middleware-ssec'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-s3/dist/es/commands/UploadPartCopyCommand.js depends on '@aws-sdk/middleware-bucket-endpoint'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-s3/dist/es/S3Client.js depends on '@aws-sdk/middleware-sdk-s3'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-s3/dist/es/S3Client.js depends on '@aws-sdk/middleware-expect-continue'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-s3/dist/es/S3Client.js depends on '@aws-sdk/eventstream-serde-config-resolver'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-s3/dist/es/commands/PutBucketTaggingCommand.js depends on '@aws-sdk/middleware-apply-body-checksum'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-sdk/client-s3/dist/es/commands/CreateBucketCommand.js depends on '@aws-sdk/middleware-location-constraint'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/macbook/Projects/node_modules/@aws-amplify/predictions/lib-esm/Providers/AmazonAIConvertPredictionsProvider.js depends on '@aws-sdk/util-utf8-node'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Some of the blogs I followed

https://github.com/angular/angular-cli/issues/18025

https://github.com/aws-amplify/amplify-js/issues/6202

Source: Angular Questions