Skip to content

Commit 07d056f

Browse files
authored
Merge pull request #154 from NMFS-RADFish/152-docs---add-how-to-remove-service-worker-steps
152 docs add how to remove service worker steps
2 parents e983d50 + 02e3404 commit 07d056f

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"label": "Available Scripts",
3+
"position": 7,
4+
"link": {
5+
"type": "generated-index",
6+
"slug": "developer-documentation/building-your-application/patterns"
7+
}
8+
}
9+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
sidebar_position: 8
3+
title: Service Worker Removal
4+
---
5+
6+
### Removing the Preconfigured Service Worker
7+
8+
> **Disclaimer:** The service worker in this template is designed to provide offline functionality and improve app performance. Removing it is generally not recommended; however, if needed, follow these steps:
9+
10+
1. **Uninstall the Service Worker Plugin**
11+
Run the following command to uninstall `vite-plugin-pwa`:
12+
```bash
13+
npm uninstall vite-plugin-pwa
14+
```
15+
2. **Remove Configuration from Vite**
16+
Open `vite.config.js` and remove `vite-plugin-pwa`.
17+
18+
3. **Remove Service Worker Setup**
19+
In your `src/index.js` file, remove the service worker configurations.
20+
21+
After these steps, the service worker will be removed from the application.
22+

0 commit comments

Comments
 (0)