Make config
property of InjectManifest
class protected
instead of private
`
#3039
Labels
config
property of InjectManifest
class protected
instead of private
`
#3039
Library Affected:
workbox-webpack-plugin
Issue or Feature Request Description:
So, I am making a plugin that allows me to use workbox with angular, and I use typescript. Even my webpack config uses typescript.
As part of this effort, I use a class that inherits from
InjectManifest
.I need to add
index.html
andmanifest.webmanifest
toadditionalManifestEntries
. This addition needs to be done not just during the initial webpack config setup. Rather, it must be done every time compilation runs (which is every time I make a change and save), so that I can add the compilation hash as the revision number for the two entries. This lets the existing service worker know that some file has changed somewhere, without having to add any lazy-loaded modules to the manifest entries.For this, I need access to the
config
property of theInjectManifest
class which I inherit from, but it is marked asprivate
, so I cannot access it.As illustrated by my example above, this is poor for extensibility. If possible, I recommend making it
protected
instead ofprivate
. That way, it remains private. But those who want to extend the behavior of the plugin can do so easily.Currently, the workaround for this is to go into the
node_modules
folder and manually edit the.d.ts
. This has enabled me to successfully finish my plugin, but I will have to keep returning to this whenever a new version of workbox releases.The text was updated successfully, but these errors were encountered: