Skip to content
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

Fixing bundled imports #79

Merged
merged 1 commit into from
Apr 8, 2024
Merged

Conversation

moose115
Copy link
Contributor

@moose115 moose115 commented Apr 6, 2024

Objective

See #78 for details. Bundled code contained an import from maplibre-gl.

import maplibregl, {addProtocol as addProtocol$1} from 'maplibre-gl';

Rather than importing from maplibre-gl again, the functions can be imported from index.ts where they are re-exported anyway, preventing the bundler from importing addProtocol as named import and renaming it.

Description

In caching.ts I tweaked the import.

Acceptance

The resulting bundle imports the default import from maplibre-gl only.

Checklist

  • I have added relevant info to the CHANGELOG.md (is it big enough to make it 2.0.1?)

@jonathanlurie jonathanlurie self-requested a review April 8, 2024 07:50
Copy link
Contributor

@jonathanlurie jonathanlurie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @moose115 for this fix! I'll be merging it this morning and release a patch just after!

@jonathanlurie jonathanlurie merged commit be571e6 into maptiler:main Apr 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants