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

Inline maplibre css from node_modules #7140

Merged
merged 3 commits into from
Sep 7, 2024

Conversation

birkskyum
Copy link
Contributor

This pulls the css from node_modules instead of unpkg. Mapbox traces inline the css, and doing so for maplibre as well will allow the map_ traces to run fully offline, ofc. at the cost of some bundle size.

Fixes #7139

This works for the dev server npm run start, but it might not yet get the .css inline in the build.

@archmoj
Copy link
Contributor

archmoj commented Sep 3, 2024

@birkskyum Thanks very much for the PR.
Is this PR ready for review?

@birkskyum
Copy link
Contributor Author

Can you test if a build works, and not just the dev server?

@archmoj
Copy link
Contributor

archmoj commented Sep 3, 2024

@gvwilson gvwilson added community community contribution P1 needed for current cycle fix fixes something broken labels Sep 3, 2024
@archmoj archmoj marked this pull request as ready for review September 6, 2024 17:00
@archmoj
Copy link
Contributor

archmoj commented Sep 6, 2024

@birkskyum please add a draft log.
Thank you!

src/registry.js Outdated Show resolved Hide resolved
@birkskyum
Copy link
Contributor Author

birkskyum commented Sep 6, 2024

i believe it's working now - i see the ~66kb ( size of the .css ) added to the bundle.

@archmoj
Copy link
Contributor

archmoj commented Sep 7, 2024

Nicely revised.
💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community contribution fix fixes something broken P1 needed for current cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plotly tries to access maplibre-gl.css
3 participants