Webpack 用に WorkboxPlugin をセットアップしようとしています。https://developers.google.com/web/tools/workbox/guides/get-started で提供されているチュートリアルに従いましたが、最後に失敗した監査を取り除くことができません:
Users will not be prompted to install the Web App:
Failures: service worker does not successfully serve the manifest's start url
基本的にオフライン ページを提供しています/offlineが、プラグインでルーティングする方法がわかりませんでした。
webpackプラグイン:
  new WorkboxPlugin.GenerateSW({
            swDest: 'sw.js',
            clientsClaim: true,
            skipWaiting: true,
            runtimeCaching: [
                {
                    urlPattern: new RegExp('/offline'),
                    handler: 'staleWhileRevalidate',
                },
                {
                    urlPattern: new RegExp('/'),
                    handler: 'staleWhileRevalidate',
                },
            ],
        }),
    ],
私のマニフェストのstartUrlは次を指しています:"start_url": "./", 
生成された sw.js:
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.1.0/workbox-sw.js");
importScripts(
  "/precache-manifest.b0461f0dafa721eb54bbbe7cf6e3d452.js"
);
self.__precacheManifest = [].concat(self.__precacheManifest || []);
workbox.precaching.suppressWarnings();
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
workbox.routing.registerRoute(/\/offline/, workbox.strategies.staleWhileRevalidate(), 'GET');
workbox.routing.registerRoute(/\//, workbox.strategies.staleWhileRevalidate(), 'GET');
プリキャッシュマニフェストも問題ないようです
私は何が欠けていますか?
とても有難い!