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
This plugin does not work with the latest (at the time of writing) parcel-bundler@1.10.1.
If you update the example and use the default sw.js generation strategy parcel fails on parsing the entry index.html file as it now seems to look for files included with navigator.serviceWorker.register('service-worker.js')
jt@ac:~/projects/parcel-plugin-sw-cache/example$ yarn build
yarn run v1.10.1
$ parcel build --out-dir build src/index.html --public-url /
🚨 /home/jt/projects/parcel-plugin-sw-cache/example/src/service-worker.js: ENOENT: no such file or directory, open '/home/jt/projects/parcel-plugin-sw-cache/example/src/service-worker.js'
Error: ENOENT: no such file or directory, open '/home/jt/projects/parcel-plugin-sw-cache/example/src/service-worker.js'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
jt@ac:~/projects/parcel-plugin-sw-cache/example
$
It seems if a service worker is to be generated from the output build of parcel then the plugin would need to inject the service worker registration code into the entry html.
The text was updated successfully, but these errors were encountered:
The main issue is that the service worker isn't ready yet when parcel doesn't the bundling, because the sw is created based on the files created during bundling. There is no official way to do this.
This plugin does not work with the latest (at the time of writing)
parcel-bundler@1.10.1
.If you update the example and use the default
sw.js
generation strategy parcel fails on parsing the entryindex.html
file as it now seems to look for files included withnavigator.serviceWorker.register('service-worker.js')
It seems if a service worker is to be generated from the output build of parcel then the plugin would need to inject the service worker registration code into the entry html.
The text was updated successfully, but these errors were encountered: