egg-sw
v1.0.2
Published
server-worker.js bounce middleware for egg
Downloads
1
Readme
egg-sw
Install
$ npm i egg-sw --save
Usage
// {app_root}/config/plugin.js
exports.sw = {
enable: true,
package: 'egg-sw',
};
Configuration
// {app_root}/config/config.default.js
exports.sw = {
prefix: '/',
path: '/service-worker.js',
dir: path.join(appInfo.baseDir, 'app/public'),
preload: false,
buffer: false,
maxFiles: 1,
dynamic: true,
};
see config/config.default.js for more detail.
Example
Questions & Suggestions
Please open an issue here.