You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue or Feature Request Description:after upgrade my workbox-webpack-plugin to 6.2.0 automatically, I got an error without any configuration modified like this: ERROR in Please check your GenerateSW plugin configuration:
[WebpackGenerateSW.runtimeCaching.1.options.plugins.0.cachedResponseWillBeUsed] 'cachedResponseWillBeUsed' property type must be object.
And my workbox configuration is like: {cachedResponseWillBeUsed: async({cacheName, request, matchOptions, cachedResponse, event}) => {...}}
I've checked the official document but get nothing useful.
The document relavant to cachedResponseWillBeUsed didn't update at all.
When reporting bugs, please include relevant JavaScript Console logs and links to public URLs at which the issue could be reproduced.
The text was updated successfully, but these errors were encountered:
I've checked the source code and tried to fix this problem, and I find that there are some problems with definition in workbox-build/build/schema/WebpackGenerateSWOptions .
In ajv ,functions is not validate for type:object.
I tried to modify the scheme and succeed to compile.
here is my attempt: "CachedResponseWillBeUsedCallback": { "instanceof": "Function", "additionalProperties": false },
and in workbox-build/build/lib/validate-options.js: const CLASSES = { Function: Function}; const ajv = new ajv_1.default({ useDefaults: true, }); ajv.addKeyword('instanceof', { compile: schema => data => data instanceof CLASSES[schema] });
hope to be useful.
Thanks for catching this—it's an inadvertent change introduced due to the new validation logic in v6.2.0 that unfortunately wasn't identified in our alpha releases.
We'll push out v6.2.1 to deal with it, and in the meantime, you can stick with v6.1.5.
Library Affected:workbox-webpack-plugin
Browser & Platform:all browsers
Issue or Feature Request Description:after upgrade my workbox-webpack-plugin to 6.2.0 automatically, I got an error without any configuration modified like this: ERROR in Please check your GenerateSW plugin configuration:
[WebpackGenerateSW.runtimeCaching.1.options.plugins.0.cachedResponseWillBeUsed] 'cachedResponseWillBeUsed' property type must be object.
And my workbox configuration is like:
{cachedResponseWillBeUsed: async({cacheName, request, matchOptions, cachedResponse, event}) => {...}}
I've checked the official document but get nothing useful.
The document relavant to cachedResponseWillBeUsed didn't update at all.
When reporting bugs, please include relevant JavaScript Console logs and links to public URLs at which the issue could be reproduced.
The text was updated successfully, but these errors were encountered: