Skip to content

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

Merged
archmoj merged 2 commits into
masterfrom
require-unminified-mapbox-gl
Jan 28, 2021
Merged

Require unminified mapbox-gl for unminified bundles and improve compression of minified bundles#5449
archmoj merged 2 commits into
masterfrom
require-unminified-mapbox-gl

Conversation

@archmoj

@archmoj archmoj commented Jan 28, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

archmoj commented Jan 28, 2021

Copy link
Copy Markdown
Contributor Author

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

archmoj commented Jan 28, 2021

Copy link
Copy Markdown
Contributor Author
  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

archmoj commented Jan 28, 2021

Copy link
Copy Markdown
Contributor Author
  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.

@alexcjohnson alexcjohnson left a comment

Copy link
Copy Markdown
Collaborator

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

archmoj commented Jan 28, 2021

Copy link
Copy Markdown
Contributor Author

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