I'm trying to develop my ejected react app to work as a PWA. I am using workboxWebpackPlugin. The serviceWorker is registered and apparently caching is working fine.
here is my webpack config:
new WorkboxWebpackPlugin.GenerateSW({
clientsClaim: true,
exclude: [/\.map$/, /asset-manifest\.json$/],
// importWorkboxFrom: "cdn",
navigateFallback: "/static-files/fallback.html",
navigateFallbackBlacklist: [
// Exclude URLs starting with /_, as they're likely an API call
new RegExp("^/_"),
// Exclude URLs containing a dot, as they're likely a resource in
// public/ and not a SPA route
new RegExp("/[^/]+\\.[^/]+$"),
],
importsDirectory: __dirname + "/../build/static-files",
swDest: "static-files/shab-sw.js",
}),
the problem I'm facing now is that the navigateFallback is not working and console is returning the following error:
error has occured: ChunkLoadError: Loading chunk 28 failed.
would appreciate any help in advance