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

Minify internal exports #3216

Merged
merged 3 commits into from
Oct 24, 2023
Merged

Conversation

msbarry
Copy link
Contributor

@msbarry msbarry commented Oct 14, 2023

Launch Checklist

Fix #3194 by adding minifyInternalExports option to rollup config when building minified output. See #3194 (comment) for more details on what this does.

Minified build size before: 772,277 (before) -> 761,628 (after)
Gzipped: 203,721 (before) -> 201,981 (after)

@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (fbdb32d) 75.23% compared to head (2fab74f) 75.23%.
Report is 22 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3216   +/-   ##
=======================================
  Coverage   75.23%   75.23%           
=======================================
  Files         241      241           
  Lines       19255    19256    +1     
  Branches     4339     4339           
=======================================
+ Hits        14487    14488    +1     
  Misses       4768     4768           
Files Coverage Δ
src/data/bucket.ts 92.85% <ø> (ø)
src/data/bucket/symbol_bucket.ts 50.73% <ø> (ø)
src/data/evaluation_feature.ts 100.00% <ø> (ø)
src/source/geojson_wrapper.ts 91.66% <100.00%> (ø)
src/source/geojson_worker_source.ts 62.96% <78.94%> (+0.27%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HarelM
Copy link
Collaborator

HarelM commented Oct 14, 2023

How will this affect external minification tools like when using this library and webpack for example?

@HarelM
Copy link
Collaborator

HarelM commented Oct 15, 2023

Let's wait a bit to see that we can overcome the async issue that we found out.
After that we'll merge this assuming everything is working as expected.

@HarelM
Copy link
Collaborator

HarelM commented Oct 23, 2023

Can you add a change log entry? This way if we find issue we might look into this PR for reference.
THANKS!!

@msbarry
Copy link
Contributor Author

msbarry commented Oct 24, 2023

Thanks! Added a changelog entry for this. I also tested in my create-react-app build using the output of this and everything seems to work fine. It reduced the gzipped build js file by ~2kb.

@HarelM HarelM merged commit 6447f95 into maplibre:main Oct 24, 2023
@rejas rejas mentioned this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use minifyInternalExports to decrease bundle size
3 participants