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

Tree shaking #209

Open
chanmathew opened this issue Nov 6, 2024 · 1 comment
Open

Tree shaking #209

chanmathew opened this issue Nov 6, 2024 · 1 comment
Labels
upstream-issue Issue in Maplibre itself

Comments

@chanmathew
Copy link

Hi @dimfeld - I was reviewing my app for some potential optimizations and noticed that a lot of the components exported by Svelte Maplibre are importing the entire maplibre-gl lib, is it possible to tree shake them or is that blocked by this issue here? maplibre/maplibre-gl-js#977

Please see below for bundle analysis:
CleanShot 2024-11-06 at 16 10 17@2x

@dimfeld
Copy link
Owner

dimfeld commented Nov 7, 2024

Yeah, as far as I know that issue you mentioned is the blocker and there's nothing we can do here to make tree shaking work. If you do discover some way in the future please let me know; I would like to take advantage of treeshaking if it becomes possible.

@dimfeld dimfeld added the upstream-issue Issue in Maplibre itself label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream-issue Issue in Maplibre itself
Projects
None yet
Development

No branches or pull requests

2 participants