-
Notifications
You must be signed in to change notification settings - Fork 823
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
Using async
, await
makes workbox without further transpilation break on Samsung Internet
#812
Comments
I guess |
I'm in favor of dropping async and await usage in favor of promise chains. Seems like the sanest approach for developers using Workbox. Tangental: we really should document our browser support. |
I'm strongly in favor of us switching to just using promises. I would like to see if this is something we could do for the next release (2.0.2/2.1.0). @gauntface @jeffposnick wdyt? It would unblock a few folks that are trying to use Workbox for production and as a forcing function would also help us figure out the browser support matrix for older versions of Chrome on mobile platforms. Tentatively, latest version of mobile browsers - 2 sounds reasonable and if this included Samsung browser would catch some of their use of slightly older V8. |
While it's still open for discussion, I wanted to take a look at the impact of changing our current Babel usage to include const babelPlugin = babel({
presets: [['env', {
targets: {
browsers: ['chrome >= 51'],
},
modules: false,
}], ['babili', {
comments: false,
}]],
plugins: ['external-helpers'],
}); It brings the final size of |
It looks okay in my testing, but our naming convention for the built modules doesn't play nicely with the @HenrikJoreteg, if you could confirm that this works in your testing, we can tag it the official |
Just a heads-up: we're going to tag this code as the official |
This ended up published as https://github.com/GoogleChrome/workbox/releases/tag/v2.0.3 |
See twitter discussion here: https://twitter.com/addyosmani/status/910631449753141253
@poshaughnessy noticed the starbucks PWA's SW isn't installing properly on Samsung Internet.
Turns out this is because of usage of
async
andawait
.Library Affected:
all
Browser & Platform:
Samsung Internet
Issue or Feature Request Description:
Probably best to not use it in distributed versions if you expect people to be able to use it as is in Samsung Internet.
To repro, open https://preview.starbucks.com in inspect devices on samsung internet. It fails on line 80 of our SW which is the included Workbox code: https://preview.starbucks.com/serviceworker.js
WHich is the first usage of async/await.
The text was updated successfully, but these errors were encountered: