https://github.com/ragingwind/next-workbox
Next.js plugin for workbox.js
https://github.com/ragingwind/next-workbox
Last synced: 11 months ago
JSON representation
Next.js plugin for workbox.js
- Host: GitHub
- URL: https://github.com/ragingwind/next-workbox
- Owner: ragingwind
- License: mit
- Created: 2018-02-08T08:24:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-08-15T15:15:46.000Z (almost 7 years ago)
- Last Synced: 2025-06-28T08:59:03.318Z (about 1 year ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 29
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# next-workbox
> Next.js plugin for [workbox](https://developers.google.com/web/tools/workbox/). The plugin help you to use service worker for Next.js and now 2.0
- `After 2.x, only works with now 2.0 from zeit in production mode`. You can check out after publishing your app to [now](https://zeit.co/now)
- Built on top of [next-workbox-webpack-plugin](https://github.com/ragingwind/next-workbox-webpack-plugin), you can use [almost all options](https://github.com/ragingwind/next-workbox-webpack-plugin#usage)
# Installation
```sh
npm install --save-dev next-workbox
```
or
```
yarn add -D next-workbox
```
# Usage
```js
// next.config.js
const withWorkbox = require('next-workbox');
module.exports = withWorkbox({
generateBuildId: async () => {
// You must have own custom build id
return 'my-build-id';
}
});
```
## License
MIT © [Jimmy Moon](https://jimmymoon.dev)