@io-arc/task-service-worker
Create a Service Worker file.
Execute src/sw.js
if it exists.
It is created using generateSW
of WorkBox.
* There's no watch mode.
#
UsageOr
package.json
#
Options--template, -t
#
Create a template to sw.js
.
#
sw.jsThe minimum configuration required for execution.
src/sw.js
The globDirectory
and swDest
properties, which are required by WorkBox, are ignored even if they are specified because they are generated automatically.
#
Changing output file nameDefault output file name is sw.js
, but you can change the file name.
src/sw.js
#
Manifest optionsTake a look at WorkBox#generateSW
example
src/sw.js