Giter VIP home page Giter VIP logo

blazor.pwa.msbuild's People

Contributors

adefwebserver avatar chucker avatar marin-bratanov avatar sql-mistermagoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blazor.pwa.msbuild's Issues

Ability to explicitly add items to the cache

Unless I misunderstand and misconfigure the ServiceWorkerPreCacheExcludeFiles and ServiceWorkerPreCacheExcludeReleaseFiles, we can't explicitly add things to the requiredFiles array that will be cached.

Being able to explicitly add resources can be helpful when your data comes from a some REST endpoint (e.g., a controller) and not from a static file, which I expect will be common in a real app.

EDIT: This can also be helpful for static assets used by other packages - they are not in the project folder so they won't be generated, but they need to be cached as well.

While I can edit the array myself, I must remember to edit it again after re-generating anything from the PWA infrastructure, which is error prone. I'd rather not add another js file of my own to try to add to the cache myself (this is my first touch with a PWA and I'll probably mess something up).

Set the Theme Color

Hi,

first of all, thanks for the awesome work!

I'd love to be able to set the theme_color property for the manifest.json file. Maybe I just overlooked it in the code, but I didn't find any way to customize it. Admittedly it's just a cosmetic issue, but it would be nice to set a custom color.

Cheers!
David

Install UI through Blazor rather than default banner?

Looking through your documentation, it sounds like I should be able to put the install button inside my app, but attempting to call await JSRuntime.InvokeAsync<object>("BlazorPWA.installPWA"); results in a WASM error: Microsoft.JSInterop.JSException: Could not find 'BlazorPWA' in 'window'.

I'm assuming I missed a step in there somewhere. I see the ServiceWorker.js and ServiceWorkerRegister.js, but nothing that contains installPWA.

Any pointers for getting the install to kick off from in Blazor, or is the banner the only option?

How to conitnously update pwa

I created a property group like this:

  <PropertyGroup>
    <ServiceWorkerForce>true</ServiceWorkerForce>
  </PropertyGroup>

But i still need to add

  <PropertyGroup>
    <ServiceWorkerForce>true</ServiceWorkerForce>
    <ServiceWorkerCacheVersion>2</ServiceWorkerCacheVersion>
  </PropertyGroup>

and update the cache version every time i want to add changes to the blazor project.
How can I always keep the build fresh so when I launch the app the service worker/cache version updates autmatically?

Button Click

I've just taken the latest version to test and have used the default Blazor server side project to convert to a PWA. After deploying (via Azure), I can't get the counter button click event to work? Menu items work fine, is there something additional I need to do?

Thanks

Need better logic for writing `index.html` meta tags

My website has different paths (rather than different host names) depending on the build config, like:

I'm using ServiceWorkerBaseUrl and ManifestBaseUrl to set the base accordingly.

However, this only works once. Once the index.html contains the manifest and service worker URLs, MSBuild no longer touches it:

    Condition="'$(IndexLines.Contains($(ServiceWorkerRegisterFileName)))'=='false'"

This logic doesn't really work when switching between different URLs as described above.

Two possible approaches:

  • don't edit the index.html at all, but rather create an intermediary version
  • edit it, but improve the Condition such that the edited line can still be updated

Double requests

Hi MisterMagoo,

Thanks for your package.
I know you stopped development on the package, but maybe you can answer me a question.
My server-side blazor pwa project uses identity. When i login to the page, the POST requests get send 2 times.
When i look at the developer options from the browser i see, that 1 time the POST is send from the form, and one time from ServiceWorker.
Do you know that problem?

Thanks and regards
Michael

Disable on localhost

Would it be possible to disable the creation of the pwa on localhost so i don't have to keep updating the version of clear cache every update i do?

How to extend the service worker definition for additional configuration?

I would like to be able to extend the generated service worker with some workbox backgroundsync configuration. What would be suggested way to extend the generated service worker?

Could there be a way by which the build process can take a specified .js file and merge it into the generated file?

[Question]

In a demo app, I was able to install the PWA and it launched successfully.
Closing the PWA, and opening the blazor app again with F5 or directly typing the url does not redirect to the installed PWA. Is there a way to accomplish this?

Thanks!

Don't work on ubuntu server

Hi, on localhost everything it's work great, but after deploy release version on ubuntu server baner with install option dosn't appear. Please help :)

PWA install option not available when using Azure Web Service

I can't get the PWA install option to work(does not show) when publishing the app to Azure
using web deploy.
It might be because these files creates error 404 on load:
"/css/open-iconic/FONT-LICENSE",
"/css/open-iconic/font/fonts/open-iconic.otf",
"/css/open-iconic/ICON-LICENSE",
"/css/open-iconic/README.md",

Is it possible to remove these files from the Service worker?

Icons not loading

I added icon-192.png and icon-512.png to my wwwroot folder but they do not work on my iphone. They show up correctly on the desktop, so I belive the path to the images is not the case.

Service worker fails in IIS, but works perfectly in IIS Express

Hi,

I'm sure there must be a trivial explanation for this, but I can't find it.

I create a Blazor Web Assembly project from the template. Everything works as expected. I add the nuget, and again it all works fine and when I launch the application in IIS Express, I get the install banner in desktop Chrome, and I can install the application and run it from the desktop icon, etc. No problems at all.

Then I deploy the application to full IIS. The Blazor app downloads and runs as expected. However, the install banner doesn't appear. Looking in the Chrome dev-tools, in the console I get a message that the Service Worker was registered successfully and is controlling http://localhost. However, when I check the application tab, it lists the SW status as redundant. Reloading the page or deleting the SW always results in the same message, saying "uncaught exception in Promise, request failed".

I have searched the web and tried numerous things like custom HTTP headers, opening up permissions on inetpub to Full Control for Everyone, changing the user IIS is running under, using a valid SSL certificate (which shouldn't be necessary for localhost), etc. Always the same thing: the Blazor app downloads and runs correctly, the registration of the SW succeeds, but the status is redundant and stopped.

I have also fiddled with Chrome flags, but that would seem to be useless, since the only difference is running against IIS or Express.

Any idea what I am doing wrong?

Dave

Question

Is this only for web assembly Blazor or also for the one that uses Signal-R and runs on server?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.