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

Don't check swSrc for hardcoded injection point in wizard flow #2451

Merged
merged 1 commit into from
Apr 13, 2020

Conversation

jeffposnick
Copy link
Contributor

R: @philipwalton

Fixes #2447

Using the wizard mode in the workbox-cli, there was previously a validation step that would check to see if your swSrc file contained the manifest injection point. This check wasn't updated for Workbox v5, so it was still looking for precacheAndRoute([]).

There's already runtime validation that will check for the proper injection point when you run workbox injectManifest after you complete the wizard step. That runtime validation will work properly if you happen to override the injectionPoint configuration option, which this previous hardcode assertion didn't support.

So I'm just dropping the assertion from the wizard flow entirely.

@jeffposnick jeffposnick merged commit 18939e4 into master Apr 13, 2020
@jeffposnick jeffposnick deleted the cli-injection-point branch April 13, 2020 18:46
@linonetwo
Copy link

linonetwo commented Apr 14, 2020

so we can not use the workbox now...Please release a version!


Seems I can comment code in node_modules...haha

Thanks for your great work!

@jeffposnick
Copy link
Contributor Author

In the meantime, you can also work around this issue by just adding in

// precacheAndRoute([])

commented out in your swSrc file.

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.

The wizard validation procedure not corresponds to the error message
3 participants