From fe88dd2351b9f41266700547a11cabc65ea7db91 Mon Sep 17 00:00:00 2001 From: Shane Laymance Date: Thu, 12 May 2022 07:57:44 -0700 Subject: [PATCH 1/2] Point to react-map-gl es5 bundle --- packages/react/src/components/Geo/Geocoder/index.tsx | 2 +- packages/react/src/components/Geo/MapView/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/components/Geo/Geocoder/index.tsx b/packages/react/src/components/Geo/Geocoder/index.tsx index 62741301b2c..046749369c1 100644 --- a/packages/react/src/components/Geo/Geocoder/index.tsx +++ b/packages/react/src/components/Geo/Geocoder/index.tsx @@ -1,7 +1,7 @@ import maplibregl from 'maplibre-gl'; import { createAmplifyGeocoder } from 'maplibre-gl-js-amplify'; import { useEffect, useRef } from 'react'; -import { useControl, useMap } from 'react-map-gl'; +import { useControl, useMap } from 'react-map-gl/dist/es5'; import type { IControl } from 'react-map-gl'; const GEOCODER_OPTIONS = { diff --git a/packages/react/src/components/Geo/MapView/index.tsx b/packages/react/src/components/Geo/MapView/index.tsx index f26a083af62..650a684df6c 100644 --- a/packages/react/src/components/Geo/MapView/index.tsx +++ b/packages/react/src/components/Geo/MapView/index.tsx @@ -2,7 +2,7 @@ import { Amplify, Auth } from 'aws-amplify'; import maplibregl from 'maplibre-gl'; import { AmplifyMapLibreRequest } from 'maplibre-gl-js-amplify'; import React, { forwardRef, useEffect, useMemo, useState } from 'react'; -import ReactMapGL from 'react-map-gl'; +import ReactMapGL from 'react-map-gl/dist/es5'; import type { MapProps, MapRef, TransformRequestFunction } from 'react-map-gl'; export type MapViewProps = Omit; From f31f3d30c7b3f153b819ded9ac458532ce9046e6 Mon Sep 17 00:00:00 2001 From: Shane Laymance Date: Thu, 12 May 2022 11:27:05 -0700 Subject: [PATCH 2/2] Create fast-chefs-rest.md --- .changeset/fast-chefs-rest.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fast-chefs-rest.md diff --git a/.changeset/fast-chefs-rest.md b/.changeset/fast-chefs-rest.md new file mode 100644 index 00000000000..81b613050e2 --- /dev/null +++ b/.changeset/fast-chefs-rest.md @@ -0,0 +1,5 @@ +--- +"@aws-amplify/ui-react": patch +--- + +fix(geo): Point to react-map-gl es5 bundle to mitigate es2020 build errors