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

Require unminified mapbox-gl for unminified bundles and improve compression of minified bundles #5449

Merged
merged 2 commits into from
Jan 28, 2021

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Jan 28, 2021

Commit 23c863c adds unminified mapbox-gl code to the unminified plotly.js bundles. I think this can help debugging & developing easier and possibly more on par with the open source practice.

Commit 3084e74 removes the proposed solutions (#2789 & #2792) to minify the already minified mapbox-gl (see #2787) and drops the option for IE10 and older. See https://github.com/terser/terser#compress-options noting that `typeofs: false was recommend to set this value to false for IE10 and earlier versions due to known issues.
cc: #5395

@plotly/plotly_js

@archmoj archmoj added this to the NEXT milestone Jan 28, 2021
@alexcjohnson
Copy link
Collaborator

Seems reasonable. Three questions:

  1. We're still running enough tests against the minified bundles that we'd catch a recurrence of Mapbox subplots are broken in minified bundles #2787 right?
  2. What's the impact of this on bundle sizes? Presumably it increases the unminified size a bunch, but is the minified the same?
  3. What about build time, hopefully this doesn't slow things down much?

@archmoj
Copy link
Contributor Author

archmoj commented Jan 28, 2021

Seems reasonable. Three questions:

  1. We're still running enough tests against the minified bundles that we'd catch a recurrence of Mapbox subplots are broken in minified bundles #2787 right?
  2. What's the impact of this on bundle sizes? Presumably it increases the unminified size a bunch, but is the minified the same?
  3. What about build time, hopefully this doesn't slow things down much?

I think we were good when testing those last night :) But yeah let me investigate more.

@archmoj
Copy link
Contributor Author

archmoj commented Jan 28, 2021

  1. What's the impact of this on bundle sizes? Presumably it increases the unminified size a bunch, but is the minified the same?

Here is the diff between builds before and after
diff-mapbox-gl

@archmoj
Copy link
Contributor Author

archmoj commented Jan 28, 2021

  1. What about build time, hopefully this doesn't slow things down much?

No it does not slow the processes. Plus it is way more easier to open our unminified bundles in a text editor or browser.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 LGTM, nice to simplify this part!

@archmoj
Copy link
Contributor Author

archmoj commented Jan 28, 2021

Seems reasonable. Three questions:

  1. We're still running enough tests against the minified bundles that we'd catch a recurrence of Mapbox subplots are broken in minified bundles #2787 right?

We did not remove any tests added to lock #2787.
Also here is the 2787 codepen updated using new builds.

@archmoj archmoj merged commit 6fcbc75 into master Jan 28, 2021
@archmoj archmoj deleted the require-unminified-mapbox-gl branch January 28, 2021 15:20
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.

2 participants