When utilizing the sw-precache-webpack-plugin to create a service worker for my project, I've noticed that while all my fonts, js, and css files are stored in the cache storage, the index/html file is missing. This has resulted in it not functioning properly when offline. Additionally, when attempting to add it to the homepage on the App manifest, I receive an error stating 'site cannot be installed: no matching service worker detected'.
The technology stack I'm using consists of a universal React + redux app, along with Express + ejs for the index file. I suspect that the issue may stem from using ejs instead of a default html file, as the plugin doesn't seem to locate the required file. Is there a method to specify a template for this purpose? My configuration for the sw-precache-webpack-plugin in webpack is as follows:
new SWPrecacheWebpackPlugin({
cacheId: 'tester',
filename: 'my-service-worker.js',
directoryIndex: '/',
}),
I would greatly appreciate any guidance on resolving this matter.