Closed goofblob closed 6 years ago
This is already possible (provided by workbox):
Just add "importWorkboxFrom": "local"
to your package.json
:
{
"name": "MyApp",
"cache": {
"importWorkboxFrom": "local"
}
}
(The documentation at https://developers.google.com/web/tools/workbox/reference-docs/prerelease/module-workbox-build#.Configuration is misleading.)
Amazing!
Thanks.
Is it possible to configure the plugin to load workbox-sw.js from a local source, rather than the Google CDN?
If not, it should be.
Say, the plug-in installs workbox-sw as a npm dependency, and at Parcel build time, it copies the production version of workbox-sw.js from its local node_modules folder, places it in /dist/ and sw.js does only
For one of my projects, getting workbox from the Google CDN takes longer than not using a service worker at all.
Thanks.