1 | # PWA plugin
|
2 |
|
3 | The PWA built-in plugin will normally include `registerServiceWorker.js` in `src/main` like this:
|
4 |
|
5 | ```js
|
6 | import './registerServiceWorker';
|
7 | ```
|
8 |
|
9 | But this is not compatible with SSR, so you need to include it only on client side :
|
10 |
|
11 | ```js
|
12 | if (process.client) {
|
13 | require('./registerServiceWorker');
|
14 | }
|
15 | ```
|