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

Uses babel-preset-env to transpile our bundled code #815

Merged
merged 1 commit into from
Sep 22, 2017

Conversation

jeffposnick
Copy link
Contributor

R: @philipwalton @addyosmani @gauntface
CC: @poshaughnessy @HenrikJoreteg

Fixes #812

I'm hopeful that this should lead to compatibility with Samsung Browser 5, as it's based on Chrome 51. Assuming this is merged, we can publish a pre-release tag of v2.0.2-alpha if folks want to test against that in the real world and confirm compatibility prior to the official release.

While we're touching the Babel configs, I took the opportunity to switch from the deprecated babili package to its current incarnation, babel-minify.

The final, gzipped payload size of the workbox-sw.prod.js bundle is 14,560 bytes after applying the transpilation, which is an increase of only ~260 bytes vs. the previous 2.0.1 bundle.

Copy link
Member

@addyosmani addyosmani left a comment

Choose a reason for hiding this comment

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

Thanks Jeff. Diff LGTM.

Still need to verify this works on the version of Samsung Browser that we were previously breaking on.

Copy link
Member

@philipwalton philipwalton left a comment

Choose a reason for hiding this comment

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

LGTM

I think there's probably some optimizing we could do here with the external helpers whitelist, but it may not be worth experimenting with that until v3.

@jeffposnick
Copy link
Contributor Author

The CI failures have apparently been cropping up in the daily cron runs of Travis as well with the current master, and are due to timeouts in Firefox. Here's one from yesterday unrelated to this PR:

https://travis-ci.org/GoogleChrome/workbox/jobs/278383221#L1673

I manually deployed an instance of the transpiled workbox-sw code to https://ifixit-pwa.appspot.com/ and tested it out before and after with Samsung Browser (v5.4, I think), and confirmed that it starts working offline with the transpiled code. There doesn't appear to be any regressions when I manually tested in other browsers, either.

I'd still like to tag this as pre-release on npm initially to get confirmation from other folks. I'll update the underlying GitHub issue thread when it's published.

@jeffposnick jeffposnick merged commit 1b36252 into master Sep 22, 2017
@jeffposnick jeffposnick deleted the babel-preset-env branch September 22, 2017 14:39
@HenrikJoreteg
Copy link
Contributor

Thanks for getting this sorted out folks 🎉

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.

4 participants