angular - Progressive Web App With .NET Core and .cshtml Files -


hello trying turn angular 2+ application progressive web app , running issues , not sure if using service worker correctly. have 2 main questions on how should setting up.

first, seeing following error in console , not sure need change correct url "starturl"...

site cannot installed: no matching service worker detected. may need reload page, or check service worker current page controls start url manifest

here plugin in webpack (this seems generating manifest.json correctly not sure should using start_url). pulled example google developers blog. application resouces (service-worker.js, manifest.js, bundled js/css) going dist folder.

new manifestplugin({     filename: 'manifest.json',     seed: {         name: "angular testing",         short_name: "angular testing",         theme_color: "#b92b27",         background_color: "#ffffff",         display: "standalone",         orientation: "portrait",         start_url: "./?utm_source=web_app_manifest",         icons: [             {                 src: "../../icons/android-chrome-192x192.png",                 sizes: "192x192",                 type: "image\/png"             },             {                 src: "../../icons/android-chrome-256x256.png",                 sizes: "256x256",                 type: "image\/png"             },             {                 src: "../../icons/android-chrome-256x256.png",                 type: "image/png",                 sizes: "512x512"             }         ]     } }) 

i have tried combination of different start_urls nothing has got rid of error in console , cannot install application.

my second issue not understanding if caching service-worker resources correctly. in examples has index.html file in root of project in .net core application have _layout.cshtml , index.cshtml make entry application.

new swprecachewebpackplugin({     navigatefallback: '/home/index',     staticfileglobs: [         '/',         '/home/index.cshtml',         '/home/index',         '/shared/_layout',         'wwwroot/dist/**.js',         'wwwroot/dist/**.css',         'wwwroot/dist/**.png'     ],     mergestaticsconfig: true, // if don't set true, won't see webpack-emitted assets in serviceworker config      staticfileglobsignorepatterns: [/\.map$/], // use ignore sourcemap files  }) 

i have configured service worker generated using above plugin in webpack not sure how should specifying index.cshtml sure gets cached.

when in "cache storage" under console not seeing of files expect cached including of cshtml files. there special need working?

cache storage screenshot

any appreciated.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -