New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Update to latest maplibre-gl-js-amplify for maplibre v2 support #2263
Conversation
🦋 Changeset detectedLatest commit: 6c7d6d6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -134,7 +134,7 @@ | |||
"name": "Geo", | |||
"path": "dist/esm/index.js", | |||
"import": "{ MapView, LocationSearch }", | |||
"limit": "300 kB" | |||
"limit": "330 kB" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The size increase is due to the addition of the Geofence feature in the upgraded maplibre-gl-js-amplify
package.
@@ -134,7 +134,7 @@ | |||
"name": "Geo", | |||
"path": "dist/esm/index.js", | |||
"import": "{ MapView, LocationSearch }", | |||
"limit": "300 kB" | |||
"limit": "330 kB" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we're OK with bumping this limit given this is a jump from 280kB to 330kB, or about an 11.5% jump for an app bundle using MapView
and LocationSearch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How big is the bundle now? Exactly 330k?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's now:
321.52 kBwith all dependencies, minified and gzipped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline that this bundle size bump for Geo UI component usage is unavoidable with the new GeoFence feature added to maplibre-gl-js-amplify
. Separately verified that the extra weight will only be in applications using Geo UI components, and that customers using Authenticator can still treeshake out the Geo dependencies:
Before this PR:
Authenticator
Size: 86.88 kBwith all dependencies, minified and gzipped
After this PR:
Authenticator
Size: 86.88 kBwith all dependencies, minified and gzipped
As seen above, there's no bundle size change for Authenticator users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#2263) * Upgrade maplibre to v2 * Minor version bump changeset for ui-react * Increase Geo size limit
Description of changes
This pull request updates
maplibre-gl-js-amplify
to version 2.0.0, which includes support for maplibre-gl v2.This change will negate the need for a separate
@aws-amplify/ui-react@studio
tag.Issue #, if available
N/A
Description of how you validated changes
Upgraded packages and ensured all tests pass with no code updates.
Checklist
yarn test
passessideEffects
field updatedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.