@extrawest/service-worker-generator
v1.4.0
Published
Utility tool to allow generate service-worker with environment variables
Downloads
31
Readme
Extrawest Service Worker Generator
Utility tool to allow generate service-worker with env variables
Installation
Extrawest Service Worker Generator compatible with webpack5
# with npm
npm install --save @extrawest/service-worker-generator
# with yarn
yarn add @extrawest/service-worker-generator
Usage
$ generateSW [options] <file>
Options
| Command | Description | | ----------------- |---------------------------------------------| | -e, --env [path] | (./.env) Path to environment variables file | | -o, --output-path [path] | path of build artifacts [./build] | | -h, --help | Output usage information | | -m, --mode [mode] | Output mode (dev or build) |
Example
"build-sw": "generateSW --mode=build --env ./.env ./libs/sw/firebase-messaging-sw.js --output-path ./public",
License
- See LICENSE