Skip to content

Ensure workbox is available before referencing it#2007

Merged
jeffposnick merged 1 commit intoGoogleChrome:masterfrom
merrywhether:master
Apr 3, 2019
Merged

Ensure workbox is available before referencing it#2007
jeffposnick merged 1 commit intoGoogleChrome:masterfrom
merrywhether:master

Conversation

@merrywhether
Copy link
Contributor

@merrywhether merrywhether commented Apr 3, 2019

R: @jeffposnick @philipwalton

Fixes #1915 / #1981

Sorry to follow up with a PR immediately after the publish, but it turns out order in the template does matter, as otherwise workbox might not be defined yet (total facepalm on my part)! I feel like I probably missed implementing a test somewhere in the initial pass but I'm not sure where that should've gone, so I at least added a warning comment for now. Let me know if there's something better I could add.

@philipwalton philipwalton requested a review from jeffposnick April 3, 2019 19:42
Copy link
Contributor

@jeffposnick jeffposnick left a comment

Choose a reason for hiding this comment

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

Thanks for catching this—unfortunately, it's a blind spot for our workbox-build test suite, which runs the generated SW code in an environment that has all of the workbox.* methods stubbed out.

@jeffposnick jeffposnick merged commit 12a5dae into GoogleChrome:master Apr 3, 2019
@derekdowling
Copy link

derekdowling commented Apr 15, 2019

Hey @jeffposnick any ETA on a new minor version release? We'd love to start utilizing this 🕺

@jeffposnick
Copy link
Contributor

We just pushed out v4.3.0 which should include this fix.

@EduardoRicardez
Copy link

I can't find this in v5.0.0, how can i use it?

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.

Configure navigationPreload via workbox-webpack-plugin

4 participants