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

Appsettings pwa section seems to have no effect #5

Closed
JudahGabriel opened this issue Nov 17, 2017 · 2 comments · Fixed by #6
Closed

Appsettings pwa section seems to have no effect #5

JudahGabriel opened this issue Nov 17, 2017 · 2 comments · Fixed by #6

Comments

@JudahGabriel
Copy link
Contributor

JudahGabriel commented Nov 17, 2017

Hi Mads,

The documentation appears to say that we can put PWA settings inside appsettings.json. I did this but it appears to have no effect:

// inside appsettings.json
{
  "pwa": {
    "strategy": "networkFirst"
  }
}

// inside startup.cs
services.AddProgressiveWebApp();

I would expect this to make networkFirst the strategy, but it appears to have no effect.

Running the sample locally under debugger shows that the PwaOptions constructor that takes an IConfiguration never gets called. And I see it's internal, and nothing in the library calls it.

Is this a bug? Or am I misunderstanding how the PWA settings inside appsettings.json is supposed to work? If it's a bug, I'd gladly submit a PR to fix it.

@madskristensen
Copy link
Owner

This is definitely a bug

@JudahGabriel
Copy link
Contributor Author

I'll submit a PR with a fix today.

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 a pull request may close this issue.

2 participants