-
diff --git a/docs/.vitepress/theme/components/InjectManifestCleanupOutdatedCaches.md b/docs/.vitepress/theme/components/InjectManifestCleanupOutdatedCaches.md
deleted file mode 100644
index 0679bbf3..00000000
--- a/docs/.vitepress/theme/components/InjectManifestCleanupOutdatedCaches.md
+++ /dev/null
@@ -1,11 +0,0 @@
-When the user installs the new version of the application, we will have on the service worker cache all new assets and also the old ones. To delete old assets (from previous versions that are no longer necessary), and since you are building your own service worker, you will need to add the following code to your custom service worker:
-
-```js
-import { cleanupOutdatedCaches, precacheAndRoute } from 'workbox-precaching'
-
-cleanupOutdatedCaches()
-
-precacheAndRoute(self.__WB_MANIFEST)
-```
-
-We strongly recommend you to include previous code on your custom service worker.
diff --git a/docs/.vitepress/theme/components/InjectManifestSourceMap.md b/docs/.vitepress/theme/components/InjectManifestSourceMap.md
deleted file mode 100644
index 7120ca00..00000000
--- a/docs/.vitepress/theme/components/InjectManifestSourceMap.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Since you are building your own service worker, this plugin will use Vite's `build.sourcemap` configuration option, which default value is `false`, to generate the source map.
-
-If you want to generate the source map for your service worker, you will need to generate the source map for the entire application.
diff --git a/docs/.vitepress/theme/components/PromptForUpdateImg.vue b/docs/.vitepress/theme/components/PromptForUpdateImg.vue
deleted file mode 100644
index 0487dbf1..00000000
--- a/docs/.vitepress/theme/components/PromptForUpdateImg.vue
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
- New content available, click the reload button to update.
-
-
-
-
-
-
diff --git a/docs/.vitepress/theme/components/RunExamples.md b/docs/.vitepress/theme/components/RunExamples.md
deleted file mode 100644
index ad846ace..00000000
--- a/docs/.vitepress/theme/components/RunExamples.md
+++ /dev/null
@@ -1,19 +0,0 @@
-::: warning
-Before following the instructions below, read the [Contribution Guide](https://github.com/antfu/vite-plugin-pwa/blob/main/CONTRIBUTING.md).
-:::
-
-Make sure you install project dependencies, and build the repo on your local clone/fork:
-
-```shell
-cd vite-plugin-pwa
-pnpm install
-pnpm run build
-```
-
-To run the examples, execute the following script from your shell (from root folder), it will start a CLI where you will select the framework and the pwa options:
-
-```shell
-pnpm run examples
-```
-
-If you don't run `pnpm build` first, you may see an error like, `failed to load config` or `Please verify that the package.json has a valid "main" entry`.
diff --git a/docs/.vitepress/theme/components/SsrSsg.md b/docs/.vitepress/theme/components/SsrSsg.md
deleted file mode 100644
index 3ab35d12..00000000
--- a/docs/.vitepress/theme/components/SsrSsg.md
+++ /dev/null
@@ -1,18 +0,0 @@
-If you are using `SSR/SSG`, you need to import `virtual:pwa-register` module using dynamic import and checking if `window` is not `undefined`.
-
-You can register the service worker on `src/pwa.ts` module:
-
-```ts
-import { registerSW } from 'virtual:pwa-register'
-
-registerSW({ /* ... */ })
-```
-
-and then import it from your `main.ts`:
-
-```ts
-if (typeof window !== 'undefined')
- import('./pwa')
-```
-
-You can see the [FAQ](/guide/faq#navigator-window-is-undefined) entry for more info.
diff --git a/docs/.vitepress/theme/components/TypeScriptError2307.md b/docs/.vitepress/theme/components/TypeScriptError2307.md
deleted file mode 100644
index e36d9fae..00000000
--- a/docs/.vitepress/theme/components/TypeScriptError2307.md
+++ /dev/null
@@ -1,16 +0,0 @@
-If your **TypeScript** build step or **IDE** complain about not being able to find modules or type definitions on imports, add the following to the `compilerOptions.types` array of your `tsconfig.json`:
-
-```json
-{
- "compilerOptions": {
- "types": [
- "vite-plugin-pwa/client"
- ]
- }
-}
-```
-
-Or you can add the following reference in any of your `d.ts` files (for example, in `vite-env.d.ts` or `global.d.ts`):
-```ts
-///
-```
diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts
deleted file mode 100644
index 9a22702d..00000000
--- a/docs/.vitepress/theme/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { h } from 'vue'
-import Theme from 'vitepress/theme'
-
-import './styles/main.css'
-import './styles/vars.css'
-
-import 'uno.css'
-
-import HomePage from './components/HomePage.vue'
-import ReloadPrompt from './components/ReloadPrompt.vue'
-
-export default {
- ...Theme,
- Layout() {
- return h(Theme.Layout, null, {
- 'home-features-after': () => h(HomePage),
- 'layout-bottom': () => h(ReloadPrompt),
- })
- },
-}
diff --git a/docs/.vitepress/theme/styles/main.css b/docs/.vitepress/theme/styles/main.css
deleted file mode 100644
index 914e413e..00000000
--- a/docs/.vitepress/theme/styles/main.css
+++ /dev/null
@@ -1,155 +0,0 @@
-.dark [img-light],
-.dark .logo[light-logo] {
- display: none;
-}
-
-html:not(.dark) [img-dark],
-html:not(.dark) .logo[dark-logo] {
- display: none;
-}
-
-/* Overrides */
-
-.VPSocialLink {
- transform: scale(0.9);
-}
-
-.vp-doc th,
-.vp-doc td {
- padding: 6px 10px;
- border: 1px solid #8882;
-}
-
-html:not(.dark) .vp-doc [class*=language-]:before {
- color: var(--vp-custom-block-details-text);
-}
-
-html:not(.dark) .vp-doc [class*='language-']:not(:hover) > span.copy,
-html:not(.dark) .vp-doc [class*='language-']:not(:hover) > span.copy.copied:before {
- background-color: var(--vp-code-block-hover-bg);
- opacity: 0;
-}
-
-html:not(.dark) .vp-doc [class*='language-']:hover > span.copy:hover {
- opacity: 1;
- background-color: var(--vp-code-block-hover-bg);
-}
-
-html:not(.dark) .vp-doc [class*='language-']:hover > span.copy.copied,
-html:not(.dark) .vp-doc [class*='language-']:hover > span.copy.copied:hover {
- opacity: 1;
- background-color: var(--vp-code-block-hover-bg);
-}
-
-html:not(.dark) .vp-doc [class*='language-']:hover > span.copy.copied:before,
-html:not(.dark) .vp-doc [class*='language-']:hover > span.copy.copied:hover:before {
- color: var(--vp-custom-block-details-text);
- background-color: var(--vp-code-block-hover-bg);
-}
-
-/* h3 breaks SEO => replaced with h2 with the same size */
-.home-content h2 {
- margin-top: 2rem;
- font-size: 1.35rem;
- border-bottom: none;
- margin-bottom: 0;
-}
-
-img.resizable-img {
- width: unset;
- height: unset;
-}
-
-.dark .prompt-img {
- filter: invert(86%);
-}
-
-.tagline {
- white-space: pre-wrap;
-}
-
-details > summary:hover {
- cursor: pointer;
-}
-/* remove the gray color from code block inside details > summary */
-.vp-doc .custom-block div[class*=language-] code,
-.vp-doc details > summary + div[class*='language-'] > pre > code {
- --vp-code-block-bg: transparent;
-}
-
-.pwa-toast {
- --c-divider: var(--vp-c-divider-light);
-}
-.pwa-toast .pwa-refresh {
- border-color: var(--vp-button-brand-border);
- color: var(--vp-button-brand-text);
- background-color: var(--vp-button-brand-bg);
-}
-.pwa-toast .pwa-refresh:hover {
- border-color: var(--vp-button-brand-hover-border);
- color: var(--vp-button-brand-hover-text);
- background-color: var(--vp-button-brand-hover-bg);
-}
-.pwa-toast .pwa-refresh:active {
- border-color: var(--vp-button-brand-active-border);
- color: var(--vp-button-brand-active-text);
- background-color: var(--vp-button-brand-active-bg);
-}
-.pwa-toast .pwa-cancel {
- border-color: var(--vp-button-alt-border);
- color: var(--vp-button-alt-text);
- background-color: var(--vp-button-alt-bg);
-}
-.pwa-toast .pwa-cancel:hover {
- border-color: var(--vp-button-alt-hover-border);
- color: var(--vp-button-alt-hover-text);
- background-color: var(--vp-button-alt-hover-bg);
-}
-.pwa-toast .pwa-cancel:active {
- border-color: var(--vp-button-alt-active-border);
- color: var(--vp-button-alt-active-text);
- background-color: var(--vp-button-alt-active-bg);
-}
-.dark .pwa-toast {
- --pwa-divider: var(--vp-c-divider-dark-1);
-}
-
-.vp-doc :not(pre) > code {
- padding: 1px 6px;
-}
-
-/* fix height ~ 2 lines of text: 3 cards per row */
-.VPTeamMembersItem.medium .profile .data .affiliation {
- min-height: 3rem;
-}
-.VPTeamMembersItem.medium .profile .data .desc {
- min-height: 3rem;
-}
-
-/* fix height ~ 2 lines of text: 3 cards per row */
-@media (min-width: 1009px) {
- .VPTeamMembersItem.medium .profile .data .affiliation {
- min-height: 4rem;
- }
- .VPTeamMembersItem.medium .profile .data .desc {
- min-height: 4rem;
- }
-}
-/* fix height ~ 2 lines of text: 2 cards per row */
-@media (min-width: 697px) and (max-width: 985px) {
- .VPTeamMembersItem.medium .profile .data .affiliation {
- min-height: 4rem;
- }
- .VPTeamMembersItem.medium .profile .data .desc {
- min-height: 4rem;
- }
-}
-/* fix height: one card per row */
-@media (max-width: 696px) {
- .VPTeamMembersItem.medium .profile .data .affiliation {
- min-height: unset;
- }
- .VPTeamMembersItem.medium .profile .data .desc {
- min-height: unset;
- }
-}
diff --git a/docs/.vitepress/theme/styles/vars.css b/docs/.vitepress/theme/styles/vars.css
deleted file mode 100644
index 6f7ce335..00000000
--- a/docs/.vitepress/theme/styles/vars.css
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Colors
- * -------------------------------------------------------------------------- */
-
-:root {
- --vp-c-accent: #2c7f95;
- --vp-c-brand: #2c7f95;
- --vp-c-brand-light: #2e859c;
- --vp-c-brand-lighter: #3392ac;
- --vp-c-brand-dark: #00586e;
- --vp-c-brand-darker: #00586e;
- --vp-c-text-code: #2c3e50;
- --vp-code-block-bg: rgba(125, 125, 125, 0.06);
- --vp-code-block-hover-bg: rgba(125, 125, 125, 0.1);
- --vp-c-bg-mute: #f5f5f5;
- --vp-custom-block-tip-border: var(--vp-c-brand);
- --vp-custom-block-tip-text: var(--vp-c-brand-dark);
- --vp-custom-block-tip-bg: transparent;
- --vp-custom-block-tip-code-bg: var(--vp-custom-block-tip-bg);
- --vp-code-copy-code-bg: initial;
- --vp-code-copy-code-hover-bg: var(--vp-custom-block-details-text);
-}
-
-.dark {
- --vp-c-accent: #4aa6c0;
- --vp-c-brand: #4aa6c0;
- --vp-c-brand-light: #52b1cc;
- --vp-c-brand-lighter: #52b1cc;
- --vp-c-brand-dark: #52b1cc;
- --vp-c-brand-darker: #52b1cc;
- --vp-code-block-bg: rgba(0, 0, 0, 0.2);
- --vp-c-text-code: #f5f7fa;
- --vp-c-bg-mute: #2d2d2d;
- --vp-code-copy-code-bg: initial;
- --vp-code-copy-code-hover-bg: rgba(255, 255, 255, 0.05);
-}
-
-/**
- * Component: Button
- * -------------------------------------------------------------------------- */
-
-:root {
- --vp-button-brand-border: var(--vp-c-brand-light);
- --vp-button-brand-text: var(--vp-c-text-dark-1);
- --vp-button-brand-bg: var(--vp-c-brand);
- --vp-button-brand-hover-border: var(--vp-c-brand-light);
- --vp-button-brand-hover-text: var(--vp-c-text-dark-1);
- --vp-button-brand-hover-bg: var(--vp-c-brand-light);
- --vp-button-brand-active-border: var(--vp-c-brand-light);
- --vp-button-brand-active-text: var(--vp-c-text-dark-1);
- --vp-button-brand-active-bg: var(--vp-button-brand-bg);
-}
-
-/**
- * Component: Home
- * -------------------------------------------------------------------------- */
-
-:root {
- --vp-home-hero-name-color: transparent;
- --vp-home-hero-name-background: linear-gradient(347deg, #358399 30%, #3bb89c);
- --vp-home-hero-image-background-image: linear-gradient(45deg, #00586e60 30%, #e5e05660);
- --vp-home-hero-image-filter: blur(30px);
-}
-
-@media (min-width: 640px) {
- :root {
- --vp-home-hero-image-filter: blur(56px);
- }
-}
-
-@media (min-width: 960px) {
- :root {
- --vp-home-hero-image-filter: blur(72px);
- }
-}
-
-/**
- * Component: Algolia
- * -------------------------------------------------------------------------- */
-
-.DocSearch {
- --docsearch-primary-color: var(--vp-c-brand) !important;
-}
diff --git a/docs/deployment/apache.md b/docs/deployment/apache.md
deleted file mode 100644
index 4d001e67..00000000
--- a/docs/deployment/apache.md
+++ /dev/null
@@ -1,67 +0,0 @@
----
-title: Apache Http Server 2.4+ | Deployment
-next: Getting Started | Workbox
----
-
-# Apache Http Server 2.4+
-
-## Configure `manifest.webmanifest` mime type
-
-You need to configure the following mime type (see basic configuration below):
-
-```ini
-
- # Manifest file
- AddType application/manifest+json webmanifest
-
-```
-
-## Basic configuration with http to https redirection
-
-Update your `httpd.conf` configuration file with:
-
-```ini
-# httpd.conf
-ServerRoot ""
-
-Listen 80
-ServerName www.yourdomain.com
-
-DocumentRoot ""
-
-# modules
-LoadModule mime_module modules/mod_mime.so
-LoadModule rewrite_module modules/mod_rewrite.so
-
-# mime types
-
- # Manifest file
- AddType application/manifest+json webmanifest
-
-
-# your https configuration
-Include conf/extra/https-www.yourdomain.com.conf
-
-
- SSLRandomSeed startup builtin
- SSLRandomSeed connect builtin
-
-
-
- ServerName www.yourdomain.com
-
- RewriteEngine On
-
- # disable TRACE and TRACK methods
- RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
- RewriteRule .* - [F]
-
- Options +FollowSymlinks
- RewriteCond %{SERVER_PORT} !443
-
- RewriteRule (.*) https://www.yourdomain.com/ [L,R]
-
- ErrorLog logs/www.yourdomain.com-error_log
- CustomLog logs/www.yourdomain.com-access_log combined
-
-```
diff --git a/docs/deployment/aws.md b/docs/deployment/aws.md
deleted file mode 100644
index 677bcafd..00000000
--- a/docs/deployment/aws.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: AWS Amplify | Deployment
----
-
-# AWS Amplify
-
-::: info WIP
-Will coming soon.
-:::
diff --git a/docs/deployment/index.md b/docs/deployment/index.md
deleted file mode 100644
index 541d93f3..00000000
--- a/docs/deployment/index.md
+++ /dev/null
@@ -1,38 +0,0 @@
----
-title: Getting Started | Deploy
-prev: Astro | Examples
----
-
-# Getting Started
-
-Since you need to install your application as a [Progressive Web App](https://web.dev/progressive-web-apps/), you must configure your server to meet [PWA Minimal Requirements](/guide/#pwa-minimal-requirements), that is, your server **must**:
-- serve `manifest.webmanifest` with `application/manifest+json` mime type
-- you must serve your application over `https`
-- you must redirect from `http` to `https`
-
-## Servers
-
-- [Netlify](/deployment/netlify)
-- [AWS Amplify](/deployment/aws)
-- [Vercel](/deployment/aws)
-- [NGINX](/deployment/nginx)
-- [Apache Http Server 2.4+](/deployment/apache)
-
-
-## Testing your application on production
-
-Once you deploy your application to your server, you can test it using [WebPageTest](https://www.webpagetest.org/).
-
-There are many test sites, but we suggest you use `WebPageTest` as this is the most comprehensive in terms of test:
-- Security.
-- First byte time.
-- Keep alive enabled.
-- Compress transfer.
-- Cache static content.
-- Effective use of CDN.
-- Lighthouse: Core Web Vitals, Performance, Images size optimization...
-- And more...
-
-Enter the url of your application, click `Start Test` button, wait for the test to finish, the `WebPageTest` result will hint you what things on your application must be fixed/changed. The `WebPageTest` result will also score your application, it will also test your site with `Lighthouse`.
-
-For example, go to [WebPageTest](https://www.webpagetest.org/), enter `https://vite-pwa-org.netlify.app/`, click `Start Test` button, wait a few seconds for the test to finish, and see the results for this site.
diff --git a/docs/deployment/netlify.md b/docs/deployment/netlify.md
deleted file mode 100644
index 27ffc7cb..00000000
--- a/docs/deployment/netlify.md
+++ /dev/null
@@ -1,67 +0,0 @@
----
-title: Netlify | Deployment
----
-
-# Netlify
-
-## Configure `manifest.webmanifest` mime type
-
-You need to register the correct MIME type for the web manifest by adding a headers table to your `netlify.toml` file (see basic deployment below):
-```toml
-[[headers]]
- for = "/manifest.webmanifest"
- [headers.values]
- Content-Type = "application/manifest+json"
-```
-
-## Cache-Control
-
-As a general rule, files in `/assets/` can have a very long cache time, as everything in there should contain a hash in the filename.
-
-Add another headers table to your `netlify.toml` file (see basic deployment below):
-
-```toml
-[[headers]]
- for = "/assets/*"
- [headers.values]
- cache-control = '''
- max-age=31536000,
- immutable
- '''
-```
-
-## Configure http to https redirection
-
-Netlify will redirect automatically, so you don't worry about it.
-
-## Basic deployment example
-
-Add `netlify.toml` file to the root directory with the content:
-
-```toml
-[build.environment]
- NPM_FLAGS = "--prefix=/dev/null"
- NODE_VERSION = "14"
-
-[build]
- publish = "dist"
- command = "npx pnpm i --store=node_modules/.pnpm-store && npx pnpm run build"
-
-[[redirects]]
- from = "/*"
- to = "/index.html"
- status = 200
-
-[[headers]]
- for = "/manifest.webmanifest"
- [headers.values]
- Content-Type = "application/manifest+json"
-
-[[headers]]
- for = "/assets/*"
- [headers.values]
- cache-control = '''
- max-age=31536000,
- immutable
- '''
-```
diff --git a/docs/deployment/nginx.md b/docs/deployment/nginx.md
deleted file mode 100644
index 5d2e2e56..00000000
--- a/docs/deployment/nginx.md
+++ /dev/null
@@ -1,95 +0,0 @@
----
-title: NGINX | Deployment
----
-
-# NGINX
-
-## Configure `manifest.webmanifest` mime type
-
-You need to register the correct MIME type for the web manifest by adding it either to the [default](https://www.nginx.com/resources/wiki/start/topics/examples/full/#mime-types) file at `/etc/nginx/mime.types`
-
-```nginx
-# /etc/nginx/mime.types
-types {
- # Manifest files
- application/manifest+json webmanifest;
- ...
-}
-```
-
-or any `http`, `server` or location `location` block with
-
-
-```nginx
-types {
- application/manifest+json webmanifest;
-}
-```
-
-You can validate the setting by checking the HTTP headers once the app is deployed
-
-```shell script
-curl -s -I -X GET https://yourserver/manifest.webmanifest | grep content-type -i
-```
-
-and check that the result is `content-type: application/manifest+json`.
-
-## Basic configuration with http to https redirection
-
-Update your `server.conf` configuration file with:
-
-```nginx
-server {
- listen 80;
- server_name yourdomain.com www.yourdomain.com;
- return 301 https://yourdomain.com$request_uri;
-}
-```
-
-## Cache-Control
-
-Ensure you have a very restrictive setup for your `Cache-Control` headers in place.
-
-Double check that **you do not** have caching features enabled, especially `immutable`, on locations like:
-
-- `/`
-- `/sw.js`
-- `/index.html`
-- `/manifest.webmanifest`
-
-NGINX will add `E-Tag`-headers itself, so there is not much to in that regard.
-
-As a general rule, files in `/assets/` can have a very long cache time, as everything in there should contain a hash in the filename.
-
-An example configuration inside your `server` block could be:
-
-```nginx
-# all assets contain hash in filename, cache forever
-location ^~ /assets/ {
- add_header Cache-Control "public, max-age=31536000, s-maxage=31536000, immutable";
- ...
- try_files $uri =404;
-}
-
-# all workbox scripts are compiled with hash in filename, cache forever3
-location ^~ /workbox- {
- add_header Cache-Control "public, max-age=31536000, s-maxage=31536000, immutable";
- ...
- try_files $uri =404;
-}
-
-# assume that everything else is handled by the application router, by injecting the index.html.
-location / {
- autoindex off;
- expires off;
- add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always;
- ...
- try_files $uri /index.html =404;
-}
-```
-
-Be aware that this is a very simplistic approach and you must test every change, as the NGINX match precedences for locations are not very intuitive and error prone if you do not know the [exact rules](https://docs.nginx.com/nginx/admin-guide/web-server/web-server/#location_priority).
-
-::: danger
-**Always re-test and re-assure** that the caching for mission critical files is **as low** as possible if not hashed files or you might invalidate clients for a long time.
-:::
diff --git a/docs/deployment/vercel.md b/docs/deployment/vercel.md
deleted file mode 100644
index 8ba1a884..00000000
--- a/docs/deployment/vercel.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: Vercel | Deployment
----
-
-# Vercel
-
-::: info WIP
-Will coming soon.
-:::
diff --git a/docs/examples/astro.md b/docs/examples/astro.md
deleted file mode 100644
index c920e4fc..00000000
--- a/docs/examples/astro.md
+++ /dev/null
@@ -1,10 +0,0 @@
----
-title: Astro | Examples
-next: Getting Started | Deploy
----
-
-# Astro
-
-::: info WIP
-Will coming soon.
-:::
diff --git a/docs/examples/iles.md b/docs/examples/iles.md
deleted file mode 100644
index 1fd94975..00000000
--- a/docs/examples/iles.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: îles | Frameworks
----
-
-# îles
-
-You can test `îles` using the source code from its documentation website, you can find it under [docs](https://github.com/ElMassimo/iles/tree/main/docs) package/directory.
-
-The behavior used in this website is [Prompt for update](/guide/prompt-for-update).
diff --git a/docs/examples/index.md b/docs/examples/index.md
deleted file mode 100644
index 7994aea4..00000000
--- a/docs/examples/index.md
+++ /dev/null
@@ -1,108 +0,0 @@
----
-title: Getting Started | Examples
-prev: Astro | Frameworks
----
-
-# Getting Started
-
-You can find a set of examples projects on [Vite Plugin PWA GitHub repo](https://github.com/antfu/vite-plugin-pwa/tree/main/examples).
-
-All the examples projects are under `examples` package/directory of the repo root directory.
-
-::: info
-The main purpose of these examples projects is to test the service worker and not to meet the [PWA Minimal Requirements](/guide/#pwa-minimal-requirements), that is, if you use any of these examples for your projects, you will need to modify the code supplied and then test that it meets the [PWA Minimal Requirements](/guide/#pwa-minimal-requirements). Almost all the examples projects should meet [PWA Minimal Requirements](/guide/#pwa-minimal-requirements), but you must check it on your target project.
-
-All the examples projects use `@rollup/plugin-replace` to configure a timestamp initialized to `now` on each build, and so, the service worker will be regenerated/versioned on each build: this timestamp will help us since the service worker won't be regenerated/versioned if none source code changed (on your project you shouldn't want this behavior, you should want to only regenerate/version the service worker when your source code change).
-:::
-
-::: warning TRY TO AVOID INCLUDING AUTOMATIC TIMESTAMP ON YOU APPLICATION IF YOU DON'T CHANGE YOUR CODE
-We use the timestamp in the examples projects to avoid having to touch a file each time we need to test: for example, to test `Prompt for update`, we need to install the service worker first time (first build), then rebuild and restart the example project and finally refresh the browser to check the `Prompt for update` is shown.
-:::
-
-## How to run examples projects?
-
-If you want to run any of the examples projects you will need to download/clone to your local machine the `Vite Plugin PWA GitHub repo`.
-
-You will need `node 14` (or newer) to be able to build the `Vite Plugin PWA`.
-
-::: warning
-Before following the instructions below, read the [Contribution Guide](https://github.com/antfu/vite-plugin-pwa/blob/main/CONTRIBUTING.md).
-:::
-
-If you don't have installed `PNPM`, you must install it globally via `npm`:
-```shell
-npm install -g pnpm
-```
-
-Once the repo is on your local machine, you must install project dependencies and build the `vite-plugin-pwa` plugin, just run (from `vite-plugin-pwa` directory cloned locally):
-
-```shell
-pnpm install
-pnpm run build
-```
-
-We use `PNPM` but should work with any `package manager`, for example, with `YARN`:
-```shell
-yarn && yarn build
-```
-
-::: info
-From here on, we will only show the commands to run the examples projects using `PNPM`, we leave it to you how to execute them with any other` package manager`.
-:::
-
-Before we start running the examples projects, you should consider the following:
-- Use `Chromium based` browser: `Chrome`, `Chromium` or `Edge`
-- All the examples that are executed in this guide will be done over https, that is, all the projects will respond at address `https://localhost`
-- When testing an example project, the `service worker` will be installed in `https://localhost`, and so, subsequent tests in another examples projects may interfere with the previous test, because the `service worker` of the previous project will keep installed on the browser
-- Tests should be done on a private window, and so, browser addons/plugins will not interfere with the test
-
-To avoid `service worker` interference, you should do the following tasks when switching between examples projects:
-- Open `dev tools` (`Option + ⌘ + J` on `macOS`, `Shift + CTRL + J` on `Windows/Linux`)
-- Go to `Application > Storage`, you should check following checkboxes:
- - Application: [x] Unregister service worker
- - Storage: [x] Local and session storage
- - Cache: [x] Cache storage and [x] Application cache
-- Click on `Clear site data` button
-- Go to `Application > Service Workers` and check the current `service worker` is missing or has the state `deleted`
-
-Once we remove the `service worker`, run the corresponding script and just press browser `Refresh` button (or enter `https://localhost` on browser address).
-
-## How to test the examples projects Offline?
-
-To test any of the examples projects (or your project) on `offline`, just open `dev tools` (`Option + ⌘ + J` on `macOS`, `Shift + CTRL + J` on `Windows/Linux`) and go to `Application > Network`, then locate `No throttling` selector: open it and select `Offline` option.
-
-A common pitfall is to select `Offline` option, then restart the example project (or your project), and refresh the page. In that case, you will have unexpected behavior, and you should remove the service worker.
-
-If you click the browser `Refresh` button, you can inspect `Application > Network` tab on `dev tools` to check that the `Service Worker` is serving all assets instead request them to the server.
-
-::: danger
-Don't do a `hard refresh` since it will force the browser to go to the server, and then you will get `No internet connection` page.
-:::
-
-## Available Examples Projects
-
-
-
-We provide the following examples projects:
-- [Vue 3](/examples/vue)
- - [Vue 3 generateSW Router Examples](/examples/vue#generatesw): set of examples with disparate behaviors.
- - [Vue 3 injectManifest Router Examples](/examples/vue#generatesw): set of examples with disparate behaviors.
-- [React](/examples/react)
- - [React generateSW Router Examples](/examples/react#generatesw): set of examples with disparate behaviors.
- - [React injectManifest Router Examples](/examples/react#generatesw): set of examples with disparate behaviors.
-- [Svelte](/examples/svelte)
- - [Svelte generateSW Router Examples](/examples/svelte#generatesw): set of examples with disparate behaviors.
- - [Svelte injectManifest Router Examples](/examples/svelte#generatesw): set of examples with disparate behaviors.
-- [SvelteKit](/examples/sveltekit)
- - [SvelteKit generateSW Examples](/examples/sveltekit#generatesw): set of examples with disparate behaviors.
- - [SvelteKit injectManifest Examples](/examples/sveltekit#generatesw): set of examples with disparate behaviors.
-- [SolidJS](/examples/solidjs)
- - [SolidJS generateSW Router Examples](/examples/solidjs#generatesw): set of examples with disparate behaviors.
- - [SolidJS injectManifest Router Examples](/examples/solidjs#generatesw): set of examples with disparate behaviors.
-- [Preact](/examples/preact)
- - [Preact generateSW Router Examples](/examples/preact#generatesw): set of examples with disparate behaviors.
- - [Preact injectManifest Router Examples](/examples/preact#generatesw): set of examples with disparate behaviors.
-- [VitePress](/examples/vitepress): prompt for update.
-- [îles](/examples/iles): prompt for update.
-- [Astro](/examples/astro): coming soon (WIP).
-
diff --git a/docs/examples/preact.md b/docs/examples/preact.md
deleted file mode 100644
index 93c75a3a..00000000
--- a/docs/examples/preact.md
+++ /dev/null
@@ -1,44 +0,0 @@
----
-title: Preact | Examples
----
-
-# Preact
-
-The `Preact` example project can be found on `examples/preact-router` package/directory.
-
-The router used on this example project is [preact-router](https://github.com/preactjs/preact-router).
-
-The `Preact` example has been created using `create-vite` template with `pnpx`:
-
-::: details pnpx create-vite
-
-```shell
-pnpx create-vite
-+ create-vite 2.6.6
-√ Project name: ... preact-router
-√ Select a framework: » preact
-√ Select a variant: » preact-ts
-
-Scaffolding project in examples\preact-router...
-
-Done. Now run:
-
- cd preact-router
- npm install
- npm run dev
-```
-:::
-
-To test `new content available`, you should rerun the corresponding script, and then refresh the page.
-
-## Executing the examples
-
-
-
-## generateSW
-
-
-
-## injectManifest
-
-
diff --git a/docs/examples/react.md b/docs/examples/react.md
deleted file mode 100644
index 4c371191..00000000
--- a/docs/examples/react.md
+++ /dev/null
@@ -1,44 +0,0 @@
----
-title: React | Examples
----
-
-# React
-
-The `React` example project can be found on `examples/react-router` package/directory.
-
-The router used on this example project is [react-router](https://reactrouter.com/).
-
-The `React` example has been created using `create-vite` template with `pnpx`:
-
-::: details pnpx create-vite
-
-```shell
-pnpx create-vite
-+ create-vite 2.5.4
-√ Project name: ... react-router
-√ Select a framework: » react
-√ Select a variant: » react-ts
-
-Scaffolding project in examples\react-router...
-
-Done. Now run:
-
- cd react-router
- npm install
- npm run dev
-```
-:::
-
-To test `new content available`, you should rerun the corresponding script, and then refresh the page.
-
-## Executing the examples
-
-
-
-## generateSW
-
-
-
-## injectManifest
-
-
diff --git a/docs/examples/solidjs.md b/docs/examples/solidjs.md
deleted file mode 100644
index c4a88f6f..00000000
--- a/docs/examples/solidjs.md
+++ /dev/null
@@ -1,34 +0,0 @@
----
-title: SolidJS | Examples
----
-
-# SolidJS
-
-The `SolidJS` example project can be found on `examples/solid-router` package/directory.
-
-The router used on this example project is [solid-app-router](https://github.com/solidjs/solid-app-router).
-
-The `SolidJS` example has been created using `https://github.com/solidjs/templates` template with `npx`:
-
-::: details npx degit solidjs/templates/ts-router solid-router
-
-```shell
-npx degit solidjs/templates/ts-router solid-router
-> cloned solidjs/templates#HEAD to solid-router
-```
-:::
-
-To test `new content available`, you should rerun the corresponding script, and then refresh the page.
-
-## Executing the examples
-
-
-
-## generateSW
-
-
-
-## injectManifest
-
-
-
diff --git a/docs/examples/svelte.md b/docs/examples/svelte.md
deleted file mode 100644
index c64f71c4..00000000
--- a/docs/examples/svelte.md
+++ /dev/null
@@ -1,44 +0,0 @@
----
-title: Svelte | Examples
----
-
-# Svelte
-
-The `Svelte` example project can be found on `examples/svelte-routify` package/directory.
-
-The router used on this example project is [@roxi/routify](https://routify.dev/).
-
-The `Svelte` example has been created using `create-vite` template with `pnpx`:
-
-::: details pnpx create-vite
-```shell
-pnpx create-vite
-+ create-vite 2.5.4
-√ Project name: ... svelte-routify
-√ Select a framework: » svelte
-√ Select a variant: » svelte-ts
-
-Scaffolding project in examples\svelte-routify...
-
-Done. Now run:
-
- cd svelte-routify
- npm install
- npm run dev
-```
-:::
-
-To test `new content available`, you should rerun the corresponding script, and then refresh the page.
-
-## Executing the examples
-
-
-
-## generateSW
-
-
-
-## injectManifest
-
-
-
diff --git a/docs/examples/sveltekit.md b/docs/examples/sveltekit.md
deleted file mode 100644
index 8ee8584e..00000000
--- a/docs/examples/sveltekit.md
+++ /dev/null
@@ -1,61 +0,0 @@
----
-title: SvelteKit | Examples
----
-
-# SvelteKit
-
-The `SvelteKit` example project can be found on `examples/sveltekit-pwa` package/directory and it is configured with `@sveltejs/adapter-static` adapter.
-
-The `SvelteKit` example has been created using `svelte@next` template with `pnpm`:
-
-::: details pnpm create svelte@next sveltekit-pwa
-```shell
-pnpm create svelte@next sveltekit-pwa
-+ create-svelte 2.0.0-next.89
-
-Progress: resolved 5, reused 5, downloaded 0, added 5, done
-
-create-svelte version 2.0.0-next.89
-
-Welcome to SvelteKit!
-
-This is beta software; expect bugs and missing features.
-
-Problems? Open an issue on https://github.com/sveltejs/kit/issues if none exists already.
-
-√ Which Svelte app template? » Skeleton project
-√ Use TypeScript? ... No / Yes
-√ Add ESLint for code linting? ... No / Yes
-√ Add Prettier for code formatting? ... No / Yes
-
-Your project is ready!
-✔ Typescript
- Inside Svelte components, use
-
-{#if toast}
-
-
- {#if $offlineReady}
-
- App ready to work offline
-
- {:else}
-
- New content available, click on reload button to update.
-
- {/if}
-
- {#if $needRefresh}
-
- {/if}
-
-
-{/if}
-
-
-```
-:::
-
-## Periodic SW Updates
-
-As explained in [Periodic Service Worker Updates](/guide/periodic-sw-updates), you can use this code to configure this behavior on your application with the virtual module `virtual:pwa-register/svelte`:
-
-```ts
-import { useRegisterSW } from 'virtual:pwa-register/svelte'
-
-const intervalMS = 60 * 60 * 1000
-
-const updateServiceWorker = useRegisterSW({
- onRegistered(r) {
- r && setInterval(() => {
- r.update()
- }, intervalMS)
- }
-})
-```
-
-The interval must be in milliseconds, in the example above it is configured to check the service worker every hour.
diff --git a/docs/frameworks/sveltekit.md b/docs/frameworks/sveltekit.md
deleted file mode 100644
index 8a3468ca..00000000
--- a/docs/frameworks/sveltekit.md
+++ /dev/null
@@ -1,214 +0,0 @@
----
-title: SvelteKit | Frameworks
----
-
-# SvelteKit
-
-::: info
-For `Type declarations`, `Prompt for update` and `Periodic SW Updates` go to [Svelte](/frameworks/svelte) entry.
-:::
-
-You should remove all references to [SvelteKit service worker module](https://kit.svelte.dev/docs#modules-$service-worker) to disable it on your application.
-
-Since `SvelteKit` uses `SSR / SSG`, we need to add the `ReloadPrompt` component using `dynamic import`. `Vite Plugin PWA` will only register the service worker on build, it is aligned with the current behavior of [SvelteKit service worker module](https://kit.svelte.dev/docs#modules-$service-worker).
-
-The best place to include the `ReloadPrompt` is on the main layout of the application:
-
-::: details src/routes/__layout.svelte
-```html
-
-
-
- {#if (!dev && browser)}
-
- {/if}
-
-
-
-
-
-
-{#if ReloadPrompt}
-
-{/if}
-```
-:::
-
-## SvelteKit Adapters
-
-The main problem with the current implementation of the service worker module of `SvelteKit` is that you don't have access to the result applied by any adapter you have configured on your application. The service worker module of `SvelteKit` will be called before the adapter logic is applied, and so, inside the service worker module, you don't have access to those resources. Your application will not work when the user is offline, since the pages will not be included on the service worker precache manifest.
-
-When using `Vite PWA Plugin` with any `SvelteKit Adapter` you need to provide an additional script to rebuild your `pwa` once `SvelteKit` finish building your application, that is, when the adapter configured finish its job.
-
-The biggest difference between this plugin and the SvelteKit service worker module is that this plugin does not require integration into the application logic - just configuration. You can take a look at [SvelteKit example](https://github.com/antfu/vite-plugin-pwa/tree/main/examples/sveltekit-pwa) to configure the additional scripts on your application, it is quite complex since we use it for multiple behaviors with the same codebase.
-
-### Workbox manifestTransforms
-
-We must provide a list of URLs for the service worker to load and precache. We provide these to workbox using the [the `manifestTransforms` option](https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#.ManifestTransform) under `workbox` or [`injectManifest`](https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#.injectManifest). The [manifest entries](https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#.ManifestEntry) provided via this option will contain all the assets specified in the `srcDir` option.
-
-Since `SvelteKit` outputs an `.html` page for each pre-rendered page, you can use `manifestTransforms` to generate the URL from the prerendered HTML file path. For an example, see the `pwa-configuration.js` module in the next example using `@sveltejs/adapter-static`.
-
-Pages which are not prerendered or are generated with a unique adapter will need to be handled separately and the `manifestTransforms` logic will need to be modified accordingly.
-
-### Static Adapter example
-
-As an example, when using [@sveltejs/adapter-static](https://github.com/sveltejs/kit/tree/master/packages/adapter-static) with `generateSW` strategy and `Prompt for update` behavior, you will need:
-
-::: details 1) add pwa.js script
-```js
-import { copyFileSync } from 'node:fs'
-import { resolveConfig } from 'vite'
-import { VitePWA } from 'vite-plugin-pwa'
-import { pwaConfiguration } from './pwa-configuration.js'
-
-const webmanifestDestinations = [
- './.svelte-kit/output/client/',
- './build/',
-]
-
-const swDestinations = [
- './build/',
-]
-
-async function buildPwa() {
- const config = await resolveConfig({ plugins: [VitePWA({ ...pwaConfiguration })] }, 'build', 'production')
- // when `vite-plugin-pwa` is present, use it to regenerate SW after rendering
- const pwaPlugin = config.plugins.find(i => i.name === 'vite-plugin-pwa')?.api
- if (pwaPlugin?.generateSW) {
- console.log('Generating PWA...')
- await pwaPlugin.generateSW()
- webmanifestDestinations.forEach((d) => {
- copyFileSync('./.svelte-kit/output/client/_app/manifest.webmanifest', `${d}/manifest.webmanifest`)
- })
- // don't copy workbox, SvelteKit will copy it
- swDestinations.forEach((d) => {
- copyFileSync('./.svelte-kit/output/client/sw.js', `${d}/sw.js`)
- })
- console.log('Generation of PWA complete')
- }
-}
-
-buildPwa()
-```
-:::
-
-::: details 2) add pwa-configuration.js script
-
-```js
-const pwaConfiguration = {
- srcDir: './build',
- outDir: './.svelte-kit/output/client',
- includeManifestIcons: false,
- base: '/',
- scope: '/',
- manifest: {
- short_name: '',
- name: '',
- scope: '/',
- start_url: '/',
- display: 'standalone',
- theme_color: '#ffffff',
- background_color: '#ffffff',
- icons: [
- {
- src: '/pwa-192x192.png',
- sizes: '192x192',
- type: 'image/png'
- },
- {
- src: '/pwa-512x512.png',
- sizes: '512x512',
- type: 'image/png'
- },
- {
- src: '/pwa-512x512.png',
- sizes: '512x512',
- type: 'image/png',
- purpose: 'any maskable'
- }
- ]
- },
- workbox: {
- // mode: 'development',
- navigateFallback: '/',
- // vite and SvelteKit are not aligned: pwa plugin will use /\.[a-f0-9]{8}\./ by default: #164 optimize workbox work
- dontCacheBustURLsMatching: /-[a-f0-9]{8}\./,
- globDirectory: './build/',
- globPatterns: ['robots.txt', '**/*.{js,css,html,ico,png,svg,webmanifest}'],
- globIgnores: ['**/sw*', '**/workbox-*'],
- manifestTransforms: [async (entries) => {
- // manifest.webmanifest is added always by pwa plugin, so we remove it.
- // EXCLUDE from the sw precache sw and workbox-*
- const manifest = entries.filter(({ url }) =>
- url !== 'manifest.webmanifest' && url !== 'sw.js' && !url.startsWith('workbox-')
- ).map((e) => {
- let url = e.url
- if (url && url.endsWith('.html')) {
- if (url.startsWith('/'))
- url = url.slice(1)
-
- if (url === 'index.html')
- e.url = '/'
- else if (url.endsWith('index.html'))
- e.url = `/${url.substring(0, url.lastIndexOf('/'))}`
- else if (url.endsWith('.html'))
- e.url = `/${url.substring(0, url.length - '.html'.length)}`
- }
-
- return e
- })
-
- return { manifest }
- }]
- }
-}
-
-export { pwaConfiguration }
-```
-:::
-
-::: details 3) modify your build script
-```json
-{
- "scripts": {
- "build": "svelte-kit build && node ./pwa.js"
- }
-}
-```
-:::
-
-::: details 4) add Vite Plugin PWA to svelte.config.js
-```js
-import adapter from '@sveltejs/adapter-static'
-import preprocess from 'svelte-preprocess'
-import { VitePWA } from 'vite-plugin-pwa'
-import { pwaConfiguration } from './pwa-configuration.js'
-
-/** @type {import('@sveltejs/kit').Config} */
-const config = {
- // Consult https://github.com/sveltejs/svelte-preprocess
- // for more information about preprocessors
- preprocess: preprocess(),
-
- kit: {
- adapter: adapter(),
-
- // hydrate the
element in src/app.html
- target: '#svelte',
- vite: {
- plugins: [VitePWA(pwaConfiguration)]
- }
- }
-}
-
-export default config
-```
-:::
diff --git a/docs/frameworks/vitepress.md b/docs/frameworks/vitepress.md
deleted file mode 100644
index 8f2ea556..00000000
--- a/docs/frameworks/vitepress.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-title: VitePress | Frameworks
----
-
-# VitePress
-
-Since [VitePress](https://vitepress.vuejs.org/) is built using [Vuejs 3](https://v3.vuejs.org/) and
-on top of [Vite](https://vitejs.dev/), the integration with this plugin is graceful.
-
-## Plugin Configuration
-
-Just follow the [Getting Started](/guide/) section and use one of the `registerType` option to configure
-the behavior:
-
-- [Prompt for update](/guide/prompt-for-update): prompt for new content refreshing
-- [Automatic reload](/guide/auto-update) when new content available
-
-## Import Virtual Modules
-
-You need to configure a `custom theme` and use the `Layout` component to register the `ReloadPrompt.vue` component
-when using `prompt for new content available`, see [Vue 3](/frameworks/vue#vue-3).
-
-You should include the `ReloadPrompt.vue` on `.vitepress/theme/components/` directory.
-
-You can also integrate [Periodic SW updates](/guide/periodic-sw-updates).
-
-## Build
-
-Since `VitePress` will generate the pages at the end of the build process, you will need to regenerate the Service
-Worker of your application when the build process finish (the Service Worker will not have the pages on its precache).
-
-Take a look at build `VitePress` site [docs:build script](https://github.com/antfu/vite-plugin-pwa/blob/main/docs/package.json#L7).
-
-## Vite Plugin PWA Docs Site
-
-You can go to [Vite Plugin PWA](https://github.com/antfu/vite-plugin-pwa/tree/main/docs) to see the
-source code for this site and how it is configured using `VitePress`.
diff --git a/docs/frameworks/vue.md b/docs/frameworks/vue.md
deleted file mode 100644
index f61797f2..00000000
--- a/docs/frameworks/vue.md
+++ /dev/null
@@ -1,296 +0,0 @@
----
-title: Vue | Frameworks
----
-
-# Vue
-
-## Vue 3
-
-You can use the built-in `Vite` virtual module `virtual:pwa-register/vue` for `Vue 3` which will return `composition api` references (`ref`) for `offlineReady` and `needRefresh`.
-
-### Type declarations
-
-::: tip
-
-:::
-
-```ts
-declare module 'virtual:pwa-register/vue' {
- // @ts-expect-error ignore when vue is not installed
- import type { Ref } from 'vue'
-
- export interface RegisterSWOptions {
- immediate?: boolean
- onNeedRefresh?: () => void
- onOfflineReady?: () => void
- /**
- * Called only if `onRegisteredSW` is not provided.
- *
- * @deprecated Use `onRegisteredSW` instead.
- * @param registration The service worker registration if available.
- */
- onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void
- /**
- * Called once the service worker is registered (requires version `0.12.8+`).
- *
- * @param swScriptUrl The service worker script url.
- * @param registration The service worker registration if available.
- */
- onRegisteredSW?: (swScriptUrl: string, registration: ServiceWorkerRegistration | undefined) => void
- onRegisterError?: (error: any) => void
- }
-
- export function useRegisterSW(options?: RegisterSWOptions): {
- needRefresh: Ref
- offlineReady: Ref
- updateServiceWorker: (reloadPage?: boolean) => Promise
- }
-}
-```
-
-### Prompt for update
-
-You can use this `ReloadPrompt.vue` component:
-
-::: details ReloadPrompt.vue
-```vue
-
-
-
-
-
-
- App ready to work offline
-
-
- New content available, click on reload button to update.
-
-
-
-
-
-
-
-
-```
-:::
-
-### Periodic SW Updates
-
-As explained in [Periodic Service Worker Updates](/guide/periodic-sw-updates), you can use this code to configure this behavior on your application with the virtual module `virtual:pwa-register/vue`:
-
-```ts
-import { useRegisterSW } from 'virtual:pwa-register/vue'
-
-const intervalMS = 60 * 60 * 1000
-
-const updateServiceWorker = useRegisterSW({
- onRegistered(r) {
- r && setInterval(() => {
- r.update()
- }, intervalMS)
- }
-})
-```
-
-The interval must be in milliseconds, in the example above it is configured to check the service worker every hour.
-
-## Vue 2
-
-Since this plugin only supports `Vue 3`, you cannot use the virtual module `virtual:pwa-register/vue`.
-
-You can copy `useRegisterSW.js` `mixin` to your `@/mixins/` directory in your application to make it working:
-
-::: details useRegisterSW.js
-```js
-export default {
- name: 'useRegisterSW',
- data() {
- return {
- updateSW: undefined,
- offlineReady: false,
- needRefresh: false
- }
- },
- async mounted() {
- try {
- const { registerSW } = await import('virtual:pwa-register')
- const vm = this
- this.updateSW = registerSW({
- immediate: true,
- onOfflineReady() {
- vm.offlineReady = true
- vm.onOfflineReadyFn()
- },
- onNeedRefresh() {
- vm.needRefresh = true
- vm.onNeedRefreshFn()
- },
- onRegistered(swRegistration) {
- swRegistration && vm.handleSWManualUpdates(swRegistration)
- },
- onRegisterError(e) {
- vm.handleSWRegisterError(e)
- }
- })
- }
- catch {
- console.log('PWA disabled.')
- }
- },
- methods: {
- async closePromptUpdateSW() {
- this.offlineReady = false
- this.needRefresh = false
- },
- onOfflineReadyFn() {
- console.log('onOfflineReady')
- },
- onNeedRefreshFn() {
- console.log('onNeedRefresh')
- },
- updateServiceWorker() {
- this.updateSW && this.updateSW(true)
- },
- handleSWManualUpdates(swRegistration) {},
- handleSWRegisterError(error) {}
- }
-}
-```
-:::
-
-### Prompt for update
-
-You can use this `ReloadPrompt.vue` component:
-
-::: details ReloadPrompt.vue
-```vue
-
-
-
-
-
-
- App ready to work offline
-
-
- New content available, click on reload button to update.
-
-
-
-
-
-
-
-
-```
-:::
-
-### Periodic SW Updates
-
-As explained in [Periodic Service Worker Updates](/guide/periodic-sw-updates), you can use this code to configure this behavior on your application with the `useRegisterSW.js` `mixin`:
-
-```vue
-
-```
-
-The interval must be in milliseconds, in the example above it is configured to check the service worker every hour.
diff --git a/docs/guide/auto-update.md b/docs/guide/auto-update.md
deleted file mode 100644
index 06750434..00000000
--- a/docs/guide/auto-update.md
+++ /dev/null
@@ -1,64 +0,0 @@
----
-title: Automatic reload | Guide
----
-
-# Automatic reload
-
-With this behavior, once the browser detects a new version of your application, then, it will update the caches and will reload any browser windows/tabs with the application opened automatically to take the control.
-
-The disadvantage of using this behavior is that the user can lose data in any browser windows/tabs in which the application is open and is filling in a form.
-
-If your application has forms, we recommend you to change the behavior to use default `prompt` option to allow the user decide when to update the content of the application.
-
-::: danger
-Before you put your application into production, you need to be sure of the behavior you want for the service worker. Changing the behavior of the service worker from `autoUpdate` to `prompt` can be a pain.
-:::
-
-## Plugin Configuration
-
-With this option, the plugin will force `workbox.clientsClaim` and `workbox.skipWaiting` to `true` on the plugin options.
-
-You must add `registerType: 'autoUpdate'` to `vite-plugin-pwa` plugin options in your `vite.config.ts` file:
-
-```ts
-VitePWA({
- registerType: 'autoUpdate'
-})
-```
-
-### Cleanup Outdated Caches
-
-
-
-
-
-### Generate SW Source Map
-
-
-
-## Importing Virtual Modules
-
-With this behavior, you **must** import one of the virtual modules exposed by `vite-plugin-pwa` plugin **only** if you need to prompt a dialog to the user when the application is ready to work offline, otherwise you can import or just omit it.
-
-If you don't import one of the virtual modules, the automatic reload will still work.
-
-### Ready To Work Offline
-
-You must include the following code on your `main.ts` or `main.js` file:
-
-```ts
-import { registerSW } from 'virtual:pwa-register'
-
-const updateSW = registerSW({
- onOfflineReady() {},
-})
-```
-
-You will need to show a ready to work offline dialog to the user with an `OK` button inside `onOfflineReady` callback.
-
-When the user clicks the `OK` button, just hide the prompt shown on `onOfflineReady` method.
-
-### SSR/SSG
-
-
-
diff --git a/docs/guide/development.md b/docs/guide/development.md
deleted file mode 100644
index cae66b3e..00000000
--- a/docs/guide/development.md
+++ /dev/null
@@ -1,206 +0,0 @@
----
-title: Development | Guide
----
-
-# Development
-
-From version `v0.11.13` you can use the service worker on development.
-
-The PWA will not be registered, only the service worker logic, check the details for each strategy below.
-
-::: warning
-There will be only one single registration on the service worker precache manifest (`self.__WB_MANIFEST`) when necessary: `navigateFallback`.
-:::
-
-The service worker on development will be only available if `disabled` plugin option is not `true` and the `enable` development option is `true`.
-
-## Plugin configuration
-
-To enable the service worker on development, you only need to add the following options to the plugin configuration:
-
-```ts
-import { VitePWA } from 'vite-plugin-pwa'
-
-export default defineConfig({
- plugins: [
- VitePWA({
- /* other options */
- /* enable sw on development */
- devOptions: {
- enabled: true
- /* other options */
- }
- })
- ]
-})
-```
-
-## Type declarations
-
-::: warning
-Since version `0.12.4+`, the `webManifestUrl` has been deprecated, the plugin will use `navigateFallbackAllowlist` instead.
-:::
-
-```ts
-/**
- * Development options.
- */
-export interface DevOptions {
- /**
- * Should the service worker be available on development?.
- *
- * @default false
- */
- enabled?: boolean
- /**
- * The service worker type.
- *
- * @default 'classic'
- */
- type?: WorkerType
- /**
- * This option will enable you to not use the `runtimeConfig` configured on `workbox.runtimeConfig` plugin option.
- *
- * **WARNING**: this option will only be used when using `generateSW` strategy.
- *
- * @default false
- */
- disableRuntimeConfig?: boolean
- /**
- * This option will allow you to configure the `navigateFallback` when using `registerRoute` for `offline` support:
- * configure here the corresponding `url`, for example `navigateFallback: 'index.html'`.
- *
- * **WARNING**: this option will only be used when using `injectManifest` strategy.
- */
- navigateFallback?: string
-
- /**
- * This option will allow you to configure the `navigateFallbackAllowlist`: new option from version `v0.12.4`.
- *
- * Since we need at least the entry point in the service worker's precache manifest, we don't want the rest of the assets to be intercepted by the service worker.
- *
- * If you configure this option, the plugin will use it instead the default.
- *
- * **WARNING**: this option will only be used when using `generateSW` strategy.
- *
- * @default [/^\/$/]
- */
- navigateFallbackAllowlist?: RegExp[]
-
- /**
- * On dev mode the `manifest.webmanifest` file can be on other path.
- *
- * For example, **SvelteKit** will request `/_app/manifest.webmanifest`, when `webmanifest` added to the output bundle, **SvelteKit** will copy it to the `/_app/` folder.
- *
- * **WARNING**: this option will only be used when using `generateSW` strategy.
- *
- * @default `${vite.base}${pwaOptions.manifestFilename}`
- * @deprecated This option has been deprecated from version `v0.12.4`, the plugin will use navigateFallbackAllowlist instead.
- * @see navigateFallbackAllowlist
- */
- webManifestUrl?: string
-}
-```
-
-## manifest.webmanifest
-
-Since version `0.12.1` the `manifest.webmanifest` is also served on development mode: you can now check it on `dev tools`.
-
-## generateSW strategy
-
-When using this strategy, the `navigateFallback` on development options will be ignored. The PWA plugin will check if `workbox.navigateFallback` is configured and will only register it on `additionalManifestEntries`.
-
-The PWA plugin will force `type: 'classic'` on service worker registration to avoid errors on client side (not yet supported):
-
-```shell
-Uncaught (in promise) TypeError: Failed to execute 'importScripts' on 'WorkerGlobalScope': Module scripts don't support importScripts().
-```
-
-::: warning
-If your pages/routes other than the entry point are being intercepted by the service worker, use `navigateFallbackAllowlist` to include only the entry point: by default, the plugin will use `[/^\/$/]`.
-
-You **ONLY** need to add the `navigateFallbackAllowlist` option to the `devOptions` entry in `vite-plugin-pwa` configuration if your pages/routes are being intercepting by the service worker and preventing to work as expected:
-```ts
-export default defineConfig({
- plugins: [
- VitePWA({
- /* other options */
- devOptions: {
- navigateFallbackAllowlist: [/^index.html$/]
- /* other options */
- }
- })
- ]
-})
-```
-:::
-
-## injectManifest strategy
-
-You can use `type: 'module'` when registering the service worker (right now only supported on latest versions of `Chromium` based browsers: `Chromium/Chrome/Edge`):
-
-
-```ts
-devOptions: {
- enabled: true,
- type: 'module',
- /* other options */
-}
-```
-
-::: warning
-When building the application, the `vite-plugin-pwa` plugin will always register your service worker with `type: 'classic'` for compatibility with all browsers.
-:::
-
-::: tip
-You should only intercept the entry point of your application, if you don't include the `allowlist` option in the `NavigationRoute`, all your pages/routes might not work as they are being intercepted by the service worker (which will return by default the content of the entry point by not including your pages/routes in its precache manifest):
-```ts
-let allowlist: undefined | RegExp[]
-if (import.meta.env.DEV)
- allowlist = [/^\/$/]
-
-// to allow work offline
-registerRoute(new NavigationRoute(
- createHandlerBoundToURL('index.html'),
- { allowlist }
-))
-```
-:::
-
-When using this strategy, the `vite-plugin-pwa` plugin will delegate the service worker compilation to `Vite`, so if you're using `import` statements instead `importScripts` in your custom service worker, you **must** configure `type: 'module'` on development options.
-
-If you are using `registerRoute` in your custom service worker you should add `navigateFallback` on development options, the `vite-plugin-pwa` plugin will include it in the injection point (`self.__WB_MANIFEST`).
-
-You **must** not use `HMR (Hot Module Replacement)` in your custom service worker, since we cannot use yet dynamic imports in service workers: `import.meta.hot`.
-
-If you register your custom service worker (not using `vite-plugin-pwa` virtual module and configuring `injectRegister: false` or `injectRegister: null`), use the following code (remember also to add `scope` option if necessary):
-```js
-if ('serviceWorker' in navigator) {
- navigator.serviceWorker.register(
- import.meta.env.MODE === 'production' ? '/sw.js' : '/dev-sw.js?dev-sw'
- )
-}
-```
-
-If you are also using `import` statements instead `importScripts`, use the following code (remember also to add the `scope` option if necessary):
-```ts
-if ('serviceWorker' in navigator) {
- navigator.serviceWorker.register(
- import.meta.env.MODE === 'production' ? '/sw.js' : '/dev-sw.js?dev-sw',
- { type: import.meta.env.MODE === 'production' ? 'classic' : 'module' }
- )
-}
-```
-
-## Example
-
-You can find an example here: [vue-router](https://github.com/antfu/vite-plugin-pwa/tree/main/examples/vue-router).
-
-To run the example, you must build the PWA plugin (`pnpm run build` from root folder), change to `vue-router` directory
-(`cd examples/vue-router`) and run it:
-- `generateSW` strategy: `pnpm run dev`
-- `injectManifest` strategy: `pnpm run dev-claims`
-
-Since version `0.12.1`, you also have the development scripts for all other frameworks as well.
-
-The instructions for running the `dev` or `dev-claims` scripts are the same as for `vue-router` but running them in the corresponding framework directory.
diff --git a/docs/guide/faq.md b/docs/guide/faq.md
deleted file mode 100644
index cb19d79c..00000000
--- a/docs/guide/faq.md
+++ /dev/null
@@ -1,180 +0,0 @@
----
-title: FAQ | Guide
-next: Getting Started | Frameworks
----
-
-# FAQ
-
-## IDE errors 'Cannot find module' (ts2307)
-
-
-
-## Type declarations
-
-You can find the full list of the `vite-plugin-pwa` plugin configuration options in the following [types.ts module](https://github.com/antfu/vite-plugin-pwa/blob/main/src/types.ts).
-
-You can find all the `vite-plugin-pwa` virtual modules declarations in the following [client.d.ts](https://github.com/antfu/vite-plugin-pwa/blob/main/client.d.ts).
-
-## Web app manifest and 401 status code (Unauthorized)
-
-[Browsers send requests for the web manifest without credentials](https://web.dev/add-manifest/#link-manifest), so if your site sits behind auth, the request will fail with a 401 Unauthorized error – even if the user is logged in.
-
-To send the request with credentials, the `` needs a `crossorigin="use-credentials"` attribute, which you can enable via `useCredentials` in the [plugin options](https://github.com/antfu/vite-plugin-pwa/blob/main/src/types.ts#L79):
-
-```ts
-useCredentials: true
-```
-
-## Service Worker Registration Errors
-
-You can handle Service Worker registration errors if you want to notify the user with following code on your `main.ts`
-or `main.js`:
-
-```ts
-import { registerSW } from 'virtual:pwa-register'
-
-const updateSW = registerSW({
- onRegisterError(error) {}
-})
-```
-
-and then inside `onRegisterError`, just notify the user that there was an error registering the service worker.
-
-## Missing assets from SW precache manifest
-
-If you find any assets are missing from the service worker's precache manifest, you should check if they exceed the `maximumFileSizeToCacheInBytes`, the default value is **2 MiB**.
-
-You can increase the value to your needs, for example to allow assets up to **3 MiB**:
-- when using `generateSW` strategy:
-```ts
-workbox: {
- maximumFileSizeToCacheInBytes: 3000000
-}
-```
-- when using `injectManifest` strategy:
-```ts
-injectManifest: {
- maximumFileSizeToCacheInBytes: 3000000
-}
-```
-
-## Exclude routes
-
-If you need to exclude some routes from service worker interception:
-- [for `generateSW` strategy](/workbox/generate-sw#exclude-routes)
-- [for `injectManifest` strategy](/workbox/inject-manifest#exclude-routes)
-
-## `navigator / window` is `undefined`
-
-If you are getting `navigator is undefined` or `window is undefined` errors when building your application, you have configured your application in an `SSR / SSG` environment.
-
-The error could be due to using this plugin or another library not aware of `SSR / SSG`: your code will be called on the client but also on the server side on build process, so when building the application your server logic will be invoked, and there is no `navigator / window` on the server, it is `undefined`.
-
-### Third party libraries
-
-If the cause of the error is a third party library that is not aware of the `SSR / SSG` environment, the way to work around the error is to import it with a dynamic import when `window` is defined:
-
-```ts
-if (typeof window !== 'undefined')
- import('./library-not-ssr-ssg-aware')
-```
-
-Alternatively, if your framework supports component `onMount / onMounted` lifecycle hook, you can import the third party library on the callback, since the frameworks should call this lifecycle hook only on client side, you should check your framework documentation.
-
-### Vite PWA Virtual Module
-
-If the cause of the error is the virtual module of this plugin, you can work around this problem following [SSR/SSG: Prompt for update](/guide/prompt-for-update#ssr-ssg) or [SSR/SSG: Automatic reload](/guide/auto-update#ssr-ssg) entries.
-
-If you are using `autoUpdate` strategy and a `router` with `isReady` support (that is, the router allow register a callback to be called when the current component route finish loading), you can delay the service worker registration to be on the router callback.
-
-For example, using `vue-router`, you can register the service worker for `autoUpdate` strategy using this code:
-
-```ts
-import type { Router } from 'vue-router'
-
-export function registerPWA(router: Router) {
- router.isReady().then(async () => {
- const { registerSW } = await import('virtual:pwa-register')
- registerSW({ immediate: true })
- })
-}
-```
-
-You can see an example for `autoUpdate` strategy on a `SSR / SSG` environment ([vite-ssg](https://github.com/antfu/vite-ssg)) on [Vitesse Template](https://github.com/antfu/vitesse/blob/main/src/modules/pwa.ts).
-
-If you are using `prompt` strategy, you will need to load the `ReloadPrompt` component using dynamic import with async fashion, for example, using `vue 3`:
-
-```vue
-// src/App.vue
-
-
-
-
-
-
-
-
-```
-
-or using `svelte`:
-
-```html
-
-
-...
-{#if ClientReloadPrompt}
-
-{/if}
-```
-
-You can check your `SSR / SSG` environment to see if it provides some way to register components only on client side. Following with `vite-ssg` on `Vitesse Template`, it provides `ClientOnly` functional component, that will prevent registering components on server side, and so you can use the original code but enclosing `ReloadPrompt` component with it:
-
-```vue
-// src/App.vue
-
- ...
-
-
-
-
-```
-
-### VitePress
-
-You can check the [ReloadPrompt](https://github.com/antfu/vite-plugin-pwa/blob/main/docs/.vitepress/theme/components/ReloadPrompt.vue) component of this site to call the PWA virtual module:
-```vue
-
-```
diff --git a/docs/guide/index.md b/docs/guide/index.md
deleted file mode 100644
index 6fec293d..00000000
--- a/docs/guide/index.md
+++ /dev/null
@@ -1,113 +0,0 @@
----
-title: Getting Started | Guide
----
-
-# Getting Started
-
-::: tip [Learn PWA](https://web.dev/learn/pwa/)
-Progressive Web Apps (PWAs) are web application built and enhanced with modern APIs to deliver enhanced capabilities, reliability, and installability while reaching anyone, anywhere, on any device, all with a single codebase.
-
-If you want to build a Progressive Web App, you may be wondering where to start, if it's possible to upgrade a website to a PWA without starting from scratch, or how to move from a platform-specific app to a PWA.
-:::
-
-A PWA mainly consists of a [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest), a service worker and a script/module to register the service worker in the browser.
-
-If you are new to **Progressive Web Apps (PWA)**, we suggest read this guide before starting writing code: [Learn PWA](https://web.dev/learn/pwa/).
-
-## Service Worker
-
-Service workers essentially act as proxy servers that sit between web applications, the browser, and the network (when available). They are intended, among other things, to enable the creation of effective offline experiences, intercept network requests and take appropriate action based on whether the network is available, and update assets residing on the server. They will also allow access to push notifications and background sync APIs.
-
-A service worker is an event-driven [worker](https://developer.mozilla.org/en-US/docs/Web/API/Worker) registered against an origin and a path. It takes the form of a JavaScript file that can control the web-page/site that it is associated with, intercepting and modifying navigation and resource requests, and caching resources in a very granular fashion to give you complete control over how your app behaves in certain situations (the most obvious one being when the network is not available).
-
-You can find more information about service workers in [Service Worker API](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API).
-
-## vite-plugin-pwa
-
-`vite-plugin-pwa` will help you to add PWA, with almost zero configuration, to your existing applications. The plugin will add sensible built-in default configuration for common use cases.
-
-The `vite-plugin-pwa` plugin will:
-- generate the [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest): using the `manifest` plugin option
-- configure the [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) on your application entry point: adding a link on the `head` on your entry point
-- generate the service worker: using the `strategies` plugin option (for more information read [Service Worker Strategies](/guide/service-worker-strategies-and-behaviors#service-worker-strategies) section)
-- generate the script to register the service worker in the browser: using `injectRegister` plugin option (for more information read [Register Service Worker](/guide/register-service-worker) section)
-
-## Installing vite-plugin-pwa
-
-To install the `vite-plugin-pwa` plugin, just add it to your project as a `dev dependency`:
-
-With **YARN**:
-```shell
-yarn add vite-plugin-pwa -D
-```
-
-With **NPM**:
-```shell
-npm i vite-plugin-pwa -D
-```
-
-With **PNPM**:
-```shell
-pnpm i vite-plugin-pwa -D
-```
-
-## Configuring vite-plugin-pwa
-
-Edit your `vite.config.js / vite.config.ts` file and add the `vite-plugin-pwa`:
-
-```ts
-import { VitePWA } from 'vite-plugin-pwa'
-
-export default defineConfig({
- plugins: [
- VitePWA({ registerType: 'autoUpdate' })
- ]
-})
-```
-
-With this minimal configuration of the `vite-plugin-pwa` plugin, your application is now able to generate the [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) and inject it at the entry point, generate the service worker and register it in the browser.
-
-You can find the full list of the `vite-plugin-pwa` plugin configuration options in the following [client.d.ts](https://github.com/antfu/vite-plugin-pwa/blob/main/src/types.ts).
-
-::: warning
-If you are **NOT** using `vite-plugin-pwa` version `0.12.2+`, there is a bug handling `injectRegister` (the service worker generated will not include the code required to allow work with `autoUpdate` behavior).
-
-If you're using a `vite-plugin-pwa` plugin version prior to `0.12.2`, you can fix the bug using this plugin configuration:
-```ts
-import { VitePWA } from 'vite-plugin-pwa'
-
-export default defineConfig({
- plugins: [
- VitePWA({
- registerType: 'autoUpdate',
- workbox: {
- clientsClaim: true,
- skipWaiting: true
- }
- })
- ]
-})
-```
-:::
-
-If you want to check it in `dev`, add the `devOptions` option to the plugin configuration (you will have the [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) and the generated service worker):
-```ts
-import { VitePWA } from 'vite-plugin-pwa'
-
-export default defineConfig({
- plugins: [
- VitePWA({
- registerType: 'autoUpdate',
- devOptions: {
- enabled: true
- }
- })
- ]
-})
-```
-
-If you build your application, the [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) will be generated and configured on the application entry point, the service worker will be also generated and the script/module to register it in the browser added.
-
-::: info
-`vite-plugin-pwa` plugin uses [workbox-build](https://developer.chrome.com/docs/workbox/reference/workbox-build/) node library to build the service worker, you can find more information in the [Service Worker Strategies And Behaviors](/guide/service-worker-strategies-and-behaviors) and [Workbox](/workbox/) sections.
-:::
diff --git a/docs/guide/inject-manifest.md b/docs/guide/inject-manifest.md
deleted file mode 100644
index bf0e9b47..00000000
--- a/docs/guide/inject-manifest.md
+++ /dev/null
@@ -1,140 +0,0 @@
----
-title: Advanced (injectManifest) | Guide
----
-
-# Advanced (injectManifest)
-
-With this service worker `strategy` you can build your own service worker.
-
-The `vite-plugin-pwa` plugin will compile your custom service worker and inject its service worker's precache manifest.
-
-By default, the plugin will assume the `service worker` source code is located at the `Vite's public` folder with the name `sw.js`, that's, it will search in the following file: `/public/sw.js`.
-
-If you want to change the location and/or the service worker name, you will need to change the following plugin options:
-- `srcDir`: **must** be relative to the project root folder
-- `filename`: including the file extension and **must** be relative to the `srcDir` folder
-
-For example, if your service worker is located at `/src/my-sw.js` you must configure it using:
-```ts
-import { VitePWA } from 'vite-plugin-pwa'
-
-export default defineConfig({
- plugins: [
- VitePWA({
- strategies: 'injectManifest',
- srcDir: 'src',
- filename: 'my-sw.js'
- })
- ]
-})
-```
-
-## Custom Service worker
-
-We recommend you to use [Workbox](https://developers.google.com/web/tools/workbox) to build your service worker instead using `importScripts`, you will need to include `workbox-*` dependencies as `dev dependencies` to your project.
-
-### Plugin Configuration
-
-You **must** configure `strategies: 'injectManifest'` in `vite-plugin-pwa` plugin options in your `vite.config.ts` file:
-
-```ts
-VitePWA({
- strategies: 'injectManifest',
-})
-```
-
-### Service Worker Code
-
-Your custom service worker (`public/sw.js`) should have at least this code (you also need to install `workbox-precaching` as `dev dependency` to your project):
-```js
-import { precacheAndRoute } from 'workbox-precaching'
-
-precacheAndRoute(self.__WB_MANIFEST)
-```
-
-### Cleanup Outdated Caches
-
-
-
-
-
-### Generate SW Source Map
-
-
-
-## Auto Update Behavior
-
-If you need your custom service worker works with `Auto Update` behavior, you need to change the plugin configuration options and add some custom code to your service worker code.
-
-### Plugin Configuration
-
-You must configure `registerType: 'autoUpdate'` to `vite-plugin-pwa` plugin options in your `vite.config.ts` file:
-
-```ts
-VitePWA({
- registerType: 'autoUpdate'
-})
-```
-
-### Service Worker Code
-
-You **must** include in your service worker code at least this code (you also need to install `workbox-core` as `dev dependency` to your project):
-
-```js
-import { clientsClaim } from 'workbox-core'
-
-self.skipWaiting()
-clientsClaim()
-```
-
-## Prompt For Update Behavior
-
-If you need your custom service worker works with `Prompt For Update` behavior, you need to change your service worker code.
-
-### Service Worker Code
-
-You need to include on your service worker at least this code:
-
-```js
-self.addEventListener('message', (event) => {
- if (event.data && event.data.type === 'SKIP_WAITING')
- self.skipWaiting()
-})
-```
-
-## TypeScript support
-
-You can use TypeScript to write your custom service worker. To resolve service worker types, just add `WebWorker` to `lib` entry on your `tsconfig.json` file:
-
-```json
-{
- "compilerOptions": {
- "lib": ["ESNext", "DOM", "WebWorker"]
- }
-}
-```
-
-### Plugin Configuration
-
-We recommend you to put your custom service worker inside `src` directory.
-
-You need to configure `srcDir: 'src'` and `filename: 'sw.ts'` plugin options in your `vite.config.ts` file, configure both options with the directory and the name of your custom service worker properly:
-
-```ts
-VitePWA({
- srcDir: 'src',
- filename: 'sw.ts'
-})
-```
-
-### Service Worker Code
-
-You need to define `self` scope with `ServiceWorkerGlobalScope`:
-
-```ts
-import { precacheAndRoute } from 'workbox-precaching'
-
-declare let self: ServiceWorkerGlobalScope
-
-precacheAndRoute(self.__WB_MANIFEST)
-```
diff --git a/docs/guide/periodic-sw-updates.md b/docs/guide/periodic-sw-updates.md
deleted file mode 100644
index 0f94b997..00000000
--- a/docs/guide/periodic-sw-updates.md
+++ /dev/null
@@ -1,72 +0,0 @@
----
-title: Periodic Service Worker Updates | Guide
----
-
-# Periodic Service Worker Updates
-
-:::info
-If you're not importing any of the virtual modules provided by `vite-plugin-pwa` you'll need to figure out how to configure it, it is out of the scope of this guide.
-:::
-
-As explained in [Manual Updates](https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#manual-updates) entry in [The Service Worker Lifecycle](https://web.dev/service-worker-lifecycle/) article, you can use this code to configure periodic service worker updates on your application on your `main.ts` or `main.js`:
-
-::: details main.ts / main.js
-```ts
-import { registerSW } from 'virtual:pwa-register'
-
-const intervalMS = 60 * 60 * 1000
-
-const updateSW = registerSW({
- onRegistered(r) {
- r && setInterval(() => {
- r.update()
- }, intervalMS)
- }
-})
-```
-:::
-
-The interval must be in milliseconds, in the example above it is configured to check the service worker every hour.
-
-## Handling Edge Cases
-
-::: info
-From version `0.12.8+` we have a new option, `onRegisteredSW`, and `onRegistered` has been deprecated. If `onRegisteredSW` is present, `onRegistered` will never be called.
-:::
-
-Previous script will allow you to check if there is a new version of your application available, but you will need also to deal with some edge cases like:
-- server is down when calling the update method
-- the user can go offline at any time
-
-To mitigate previous problems, use this more complex snippet:
-
-::: details main.ts / main.js
-```ts
-import { registerSW } from 'virtual:pwa-register'
-
-const intervalMS = 60 * 60 * 1000
-
-const updateSW = registerSW({
- onRegisteredSW(swUrl, r) {
- r && setInterval(async () => {
- if (!(!r.installing && navigator))
- return
-
- if (('connection' in navigator) && !navigator.onLine)
- return
-
- const resp = await fetch(swUrl, {
- cache: 'no-store',
- headers: {
- 'cache': 'no-store',
- 'cache-control': 'no-cache',
- },
- })
-
- if (resp?.status === 200)
- await r.update()
- }, intervalMS)
- }
-})
-```
-:::
diff --git a/docs/guide/prompt-for-update.md b/docs/guide/prompt-for-update.md
deleted file mode 100644
index 60c19de6..00000000
--- a/docs/guide/prompt-for-update.md
+++ /dev/null
@@ -1,46 +0,0 @@
----
-title: Prompt for new content refreshing | Guide
----
-
-# Prompt for new content refreshing
-
-
-
-## Plugin Configuration
-
-Since this is the default behavior for the `registerType` plugin option, you don't need to configure it.
-
-### Cleanup Outdated Caches
-
-
-
-
-
-### Generate SW Source Map
-
-
-
-## Importing Virtual Modules
-
-You must include the following code on your `main.ts` or `main.js` file:
-```ts
-import { registerSW } from 'virtual:pwa-register'
-
-const updateSW = registerSW({
- onNeedRefresh() {},
- onOfflineReady() {},
-})
-```
-
-You will need to:
-- show a prompt to the user with refresh and cancel buttons inside `onNeedRefresh` method.
-- show a ready to work offline message to the user with an OK button inside `onOfflineReady` method.
-
-When the user clicks the "refresh" button when `onNeedRefresh` called, then call `updateSW()` function; the page will reload and the up-to-date content will be served.
-
-In any case, when the user clicks the `Cancel` or `OK` buttons in case `onNeedRefresh` or `onOfflineReady` respectively, close the corresponding showed prompt.
-
-### SSR/SSG
-
-
-
diff --git a/docs/guide/pwa-minimal-requirements.md b/docs/guide/pwa-minimal-requirements.md
deleted file mode 100644
index a4de6016..00000000
--- a/docs/guide/pwa-minimal-requirements.md
+++ /dev/null
@@ -1,136 +0,0 @@
----
-title: PWA Minimal Requirements | Guide
----
-
-# PWA Minimal Requirements
-
-Previous steps in this guide, are the minimal requirements and configuration to create the [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) and the service worker when you build your application, but you'll need to include more options to meet PWA Minimal Requirements.
-
-Your application **must** meet the PWA Minimal Requirements before deploying it to production or when testing your build on local: for example, when testing your PWA application on local using `LightHouse`.
-
-To make your PWA application installable (one of the requirements), you will need to modify your application entry point, add some minimal entries to your `Web App Manifest`, allow search engines to crawl all your application pages and configure your server properly (only for production, on local you can use `https-localhost` dependency and `node`).
-
-## Entry Point
-
-Your application entry point (usually `index.html`) **must** have the following entries in the `` section:
-- mobile viewport configuration
-- a title
-- a description
-- a favicon
-- a link for `apple-touch-icon`
-- a link for `mask-icon`
-- a meta entry for `theme-color`
-
-For example, here a minimal configuration (you must provide all the icons and images):
-```html
-
-
- My Awesome App
-
-
-
-
-
-
-```
-
-## Web App Manifest
-
-Your application [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) **must** have the following entries:
-- a scope: omitted here for simplicity, the `vite-plugin-pwa` plugin will use the `Vite` base option to configure it (default is `/`)
-- a name
-- a short description
-- a description
-- a `theme_color`: **must match** the configured one on `Entry Point theme-color`
-- an icon with `192x192` size
-- an icon with `512x512` size
-
-To configure the [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest), add the `manifest` entry to the `vite-plugin-pwa` plugin options.
-
-Following with the example, here a minimal configuration (you must provide all the icons and images):
-```ts
-import { VitePWA } from 'vite-plugin-pwa'
-
-export default defineConfig({
- plugins: [
- VitePWA({
- includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'masked-icon.svg'],
- manifest: {
- name: 'My Awesome App',
- short_name: 'MyApp',
- description: 'My Awesome App description',
- theme_color: '#ffffff',
- icons: [
- {
- src: 'pwa-192x192.png',
- sizes: '192x192',
- type: 'image/png'
- },
- {
- src: 'pwa-512x512.png',
- sizes: '512x512',
- type: 'image/png'
- }
- ]
- }
- })
- ]
-})
-```
-
-## Icons / Images
-
-For `manifest` icons entry, you will need to create `pwa-192x192.png`, and `pwa-512x512.png` icons. The icons specified above are the minimum required to meet PWA, that is, icons with `192x192` and `512x512` resolutions (last one duplicated for `purpose: 'any maskable'` if you want to add it, it is not required).
-
-We suggest you to create a svg or png icon (if it is a png icon, with the maximum resolution possible) for your application and use it to generate a favicon package in [Favicon Generator](https://realfavicongenerator.net/).
-
-For `mask-icon` in the entry point, use the svg or the png used to generate the favicon package.
-
-Once generated, download the ZIP and use `android-*` icons for `pwa-*`:
-- use `android-chrome-192x192.png` for `pwa-192x192.png`
-- use `android-chrome-512x512.png` for `pwa-512x512.png`
-- `apple-touch-icon.png` is `apple-touch-icon.png`
-- `favicon.ico` is `favicon.ico`
-
-If you want to add the `purpose: 'any maskable'` icon to the Web App Manifest:
-```ts
-icons: [
- {
- src: 'pwa-192x192.png',
- sizes: '192x192',
- type: 'image/png'
- },
- {
- src: 'pwa-512x512.png',
- sizes: '512x512',
- type: 'image/png'
- },
- {
- src: 'pwa-512x512.png',
- sizes: '512x512',
- type: 'image/png',
- purpose: 'any maskable'
- }
-]
-```
-
-## Search Engines
-
-You **must** add a `robots.txt` file to allow search engines to crawl all your application pages, just add `robots.txt` to the `public` folder on your application:
-```txt
-User-agent: *
-Allow: /
-```
-
-:::warning
-`public` folder must be on the root folder of your application, not inside the `src` folder.
-:::
-
-## Server Configuration
-
-You can use the server you want, but your server **must**:
-- serve `manifest.webmanifest` with `application/manifest+json` mime type
-- serve your application over `https`
-- redirect from `http` to `https`
-
-You can find more information in the [Deploy](/deployment/) section.
diff --git a/docs/guide/register-service-worker.md b/docs/guide/register-service-worker.md
deleted file mode 100644
index 3ca01787..00000000
--- a/docs/guide/register-service-worker.md
+++ /dev/null
@@ -1,77 +0,0 @@
----
-title: Register Service Worker | Guide
----
-
-# Register Service Worker
-
-`vite-plugin-pwa` plugin will register the service worker automatically for you, using the `injectRegister` configuration option (**optional**).
-
-If you want to configure the `injectRegister` plugin option:
-```ts
-import { VitePWA } from 'vite-plugin-pwa'
-
-export default defineConfig({
- plugins: [
- VitePWA({
- injectRegister: 'auto'
- })
- ]
-})
-```
-
-The `injectRegister` plugin configuration option, will control how to register the service worker in your application:
-- `inline`: injects a simple register script, inlined in the application entry point
-- `script`: injects a `script` tag in the `head` with the `service worker` to a generated simple register
-- `null` (manual): do nothing, you will need to register the service worker yourself, or import any of the virtual modules exposed by the plugin
-- **`auto` (default value)**: depends on whether you use any of the virtual modules exposed by the plugin, it will do nothing or switch to `script` mode
-
-
-You can find more information about the virtual modules exposed by the plugin in the [Frameworks](/frameworks/) section.
-
-## Inline Registration
-
-When configuring `injectRegister: 'inline'` in the plugin configuration, the plugin will inline a head script adding in to your application entry point:
-::: details **inlined head script**
-```html
-
-
-
-```
-:::
-
-## Script Registration
-
-When configuring `injectRegister: 'script'` in the plugin configuration, the plugin will generate a `registerSW.js` script adding it to your application entry point:
-::: details **head script**
-```html
-
-
-
-```
-:::
-
-::: details **/registerSW.js**
-```js
-if ('serviceWorker' in navigator) {
- window.addEventListener('load', () => {
- navigator.serviceWorker.register('/sw.js', { scope: '/' })
- })
-}
-```
-:::
-
-## Manual Registration
-
-When configuring `injectRegister: null` in the plugin configuration, the plugin will do nothing, you must register the service workbox manually yourself.
-
-Or you can import any of the virtual modules exposed by the plugin.
-
-## Auto Registration
-
-If your application code base is not importing any of the virtual modules exposed by the plugin, the plugin will fallback to [Script Registration](/guide/register-service-worker#script-registration), otherwise, the imported virtual module will register the service worker for you.
diff --git a/docs/guide/service-worker-precache.md b/docs/guide/service-worker-precache.md
deleted file mode 100644
index e2981a15..00000000
--- a/docs/guide/service-worker-precache.md
+++ /dev/null
@@ -1,51 +0,0 @@
----
-title: Service Worker Precache | Guide
----
-
-# Service Worker Precache
-
-As we have mentioned in [Service Worker](/guide/#service-worker) section, service workers act as proxies intercepting requests between the browser and the server.
-
-Since we are going to add PWA to your application, we need to configure the service worker so that your application can work offline. To do this, we need to configure the service worker's precache manifest, which will include all the resources of your application (basically we need to instruct the service worker what resources to store in cache storage so that it can be used for `network requests interception` and when the application is offline).
-
-::: tip Network requests interception
-You can also configure how to control the network requests interception for any of your application resources.
-
-You can find more information on [Workbox - Caching Strategies](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#caching-strategies).
-:::
-
-Once the application registers the service worker, the browser will try to install it downloading all the resources in the service worker's precache manifest. Once all the resources downloaded and stored in the cache storage by the browser, it will try to activate the service worker to take the control of the application.
-
-::: tip
-The browser **will only download all the resources** in the service worker's precache manifest if the service worker is not installed (first time the user visit your application) or if there is a new version of your application (if you change some resource in your application, the service worker will also change once you build the application, since its precache manifest is modified to include your changes).
-
-In any case, the browser **will always download all the resources in a background thread** and not in the main browser thread, this way people can use the application while the browser is trying to install the service worker.
-
-You can check this website or the [VueUse docs site](https://vueuse.org/) in a private window, just open `Network Tab` on dev tools before visiting the sites: the browser will start download all the resources while you navigate the site.
-:::
-
-## Precache Manifest
-
-Since `vite-plugin-pwa` plugin uses [workbox-build](https://developer.chrome.com/docs/workbox/modules/workbox-build/) node library to build the service worker, it will only include `css`, `js` and `html` resources in the manifest precache (check the `globPatterns` entry in [GlobPartial](https://developer.chrome.com/docs/workbox/reference/workbox-build/#type-GlobPartial)).
-
-`workbox-build` node library is file based, that is, it will traverse the build output folder of your application. `Vite` will generate your build in the `dist` folder, and so, `workbox-build` will traverse the `dist` folder adding all resources found in it to the service worker's precache manifest.
-
-If you need to include another resource types, you will need to add them to the `globPatterns` entry. Depending on the `strategy` configured in the `vite-plugin-pwa` plugin configuration, you will need to add it under the `workbox` or `injectManifest` configuration option.
-
-You can find more information in the [Static assets handling](/guide/static-assets) section.
-
-For example, if you need to add `ico`, `png` and `svg` resources in the example from the [Configuring vite-plugin-pwa - Guide](/guide/#configuring-vite-plugin-pwa) section, you will need to add `globPatterns` under `workbox` entry, since we're using the default `vite-plugin-pwa` strategy (`generateSW`):
-```ts
-import { VitePWA } from 'vite-plugin-pwa'
-
-export default defineConfig({
- plugins: [
- VitePWA({
- registerType: 'autoUpdate',
- workbox: {
- globPatterns: ['**/*.{js,css,html,ico,png,svg}']
- }
- })
- ]
-})
-```
diff --git a/docs/guide/service-worker-strategies-and-behaviors.md b/docs/guide/service-worker-strategies-and-behaviors.md
deleted file mode 100644
index eac2e96b..00000000
--- a/docs/guide/service-worker-strategies-and-behaviors.md
+++ /dev/null
@@ -1,29 +0,0 @@
----
-title: Service Worker Strategies And Behaviors | Guide
----
-
-# Service Worker Strategies And Behaviors
-
-A service worker strategy is related to how the `vite-plugin-pwa` plugin will generate your service worker, while the behavior of a service worker is related to how the service worker will work in the browser once the browser detects a new version of your application.
-
-## Service Worker Strategies
-
-As we mention in [Configuring vite-plugin-pwa](/guide/#configuring-vite-plugin-pwa) section, `vite-plugin-pwa` plugin will use `workbox-build` node library to generate your service worker. There are 2 available strategies, `generateSW` and `injectManifest`:
-- `generateSW`: the `vite-plugin-pwa` will generate the service worker for you, you don't need to write the code for the service worker
-- `injectManifest`: the `vite-plugin-pwa` plugin will compile your custom service worker and inject its precache manifest
-
-To configure the service worker strategy, use the `strategies`' plugin option with `generateSW` (**default strategy**) or `injectManifest` value.
-
-You can find more information about the strategies in the [generateSW](/workbox/generate-sw) or [injectManifest](/workbox/inject-manifest) `Workbox` sections.
-
-## Service Worker Behaviors
-
-The behavior of the service worker will help you to update the application in the browser, that is, when the browser detects a new version of your application, you can control how the browser updates it.
-
-You may want to not bother users and just have the browser update the application when there is a new version: the user will only see a reload of the page they are on.
-
-Or you may want to inform the user that there is a new version of the application, and let the user decide when to update it: simply because you want it to behave that way or because your application requires it (for example, to prevent data loss if the user is filling out a form).
-
-To configure the service worker behavior, use the `registerType` plugin option with `autoUpdate` or `prompt` (**default strategy**) value.
-
-You can find more information about the behaviors in the [auto-update](/guide/auto-update) or [prompt-for-update](/guide/prompt-for-update) sections for `generateSW` strategy or in [inject-manifest](/guide/inject-manifest) section for `injectManifest` strategy.
diff --git a/docs/guide/static-assets.md b/docs/guide/static-assets.md
deleted file mode 100644
index 97dd3774..00000000
--- a/docs/guide/static-assets.md
+++ /dev/null
@@ -1,43 +0,0 @@
----
-title: Static assets handling | Guide
----
-
-# Static assets handling
-
-By default, all icons on `PWA Web App Manifest` option found under `Vite's publicDir` option directory, will be included in the service worker *precache*. You can disable this option using `includeManifestIcons: false`.
-
-You can also add another static assets such as `favicon`, `svg` and `font` files using `includeAssets` option. The `includeAssets` option will be resolved using `fast-glob` found under Vite's `publicDir` option directory, and so you can use regular expressions to include those assets, for example: `includeAssets: ['fonts/*.ttf', 'images/*.png']`. You don't need to configure `PWA Manifest icons` on `includeAssets` option.
-
-## globPatterns
-
-If you need to include other assets that are not under Vite's `publicDir` option directory, you can use the `globPatterns` parameter of [workbox](https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#.generateSW) or [injectManifest](https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#.injectManifest) plugin options.
-
-::: warning
-If you configure `globPatterns` on `workbox` or `injectManifest` plugin option, you **MUST** include all your assets patterns: `globPatterns` will be used by `workbox-build` to match files on `dist` folder.
-
-By default, `globPatterns` will be `**/*.{js,css,html}`: `workbox` will use [glob primer](https://github.com/isaacs/node-glob#glob-primer) to match files using `globPatterns` as filter.
-
-A common pitfall is to only include some assets and forget to add `css`, `js` and `html` assets pattern, and then your service worker will complain about missing resources.
-
-For example, if you don't include `html` assets pattern, you will get this error from your service worker: **WorkboxError non-precached-url index.html**.
-:::
-
-If you use `generateSW` strategy, then you need to configure `globPatterns` inside `workbox` plugin option:
-
-```ts
-VitePWA({
- workbox: {
- globPatterns: [],
- }
-})
-```
-
-If you use `injectManifest` strategy, then you need to configure`globPatterns` inside `injectManifest` plugin option:
-
-```ts
-VitePWA({
- injectManifest: {
- globPatterns: [],
- }
-})
-```
diff --git a/docs/guide/unregister-service-worker.md b/docs/guide/unregister-service-worker.md
deleted file mode 100644
index d4cdda01..00000000
--- a/docs/guide/unregister-service-worker.md
+++ /dev/null
@@ -1,28 +0,0 @@
----
-title: Unregister Service Worker | Guide
----
-
-# Unregister Service Worker
-
-If you want to unregister the service worker from your PWA application, you only need to add `selfDestroying: true` to the plugin configuration.
-
-`vite-plugin-pwa` plugin will create a new special service worker and replace the existing one in your application once deployed in production: it has to be put in the place of the previous broken/unwanted service worker, with the same name.
-
-::: danger
-It is **IMPORTANT TO NOT CHANGE ANYTHING** in the plugin configuration, especially **DO NOT CHANGE THE SERVICE WORKER NAME**, just keep the options and the PWA UI components (if included), the plugin will take care of changing the service worker and avoid interacting with the UI if configured.
-:::
-
-In a future, if you want to add the PWA again to your application, you only need to remove the `selfDestroying` option or just disable it: `selfDestroying: false`.
-
-## Development
-
-You can also check the `selfDestroying` plugin option in the dev server with development options enabled: check [Development section](/guide/development) for more info.
-
-## Examples
-
-You have in the examples folder the `**-destroy` scripts in their corresponding `package.json`, you can try it on the development server or from the production build.
-
-
-## Credits
-
-The implementation is based on this GitHub repo [Self-destroying ServiceWorker](https://github.com/NekR/self-destroying-sw), for more info read [Medium: Self-destroying ServiceWorker](https://medium.com/@nekrtemplar/self-destroying-serviceworker-73d62921d717).
diff --git a/docs/index.md b/docs/index.md
deleted file mode 100644
index 7f99feb7..00000000
--- a/docs/index.md
+++ /dev/null
@@ -1,54 +0,0 @@
----
-layout: home
-sidebar: false
-
-title: Vite Plugin PWA
-
-hero:
- name: PWA
- text: Vite Plugin
- tagline: |
- Zero-config and framework-agnostic
- PWA Plugin for Vite
- image:
- light:
- src: /icon_light.svg
- alt: Vite Plugin PWA
- dark:
- src: /icon_dark.svg
- alt: Vite Plugin PWA
- actions:
- - theme: brand
- text: Get Started
- link: /guide/
- - theme: alt
- text: View on GitHub
- link: https://github.com/antfu/vite-plugin-pwa
-
-features:
- - icon: 👌
- title: Zero-Config
- details: Sensible built-in default configs for common use cases
- - icon: 🔩
- title: Extensible
- details: Expose the full ability to customize the behavior of the plugin
- - icon: 🔌
- title: Offline Support
- details: Generate Service Worker with Offline support (via Workbox)
- - icon: ⚡
- title: Fully tree shakable
- details: Auto inject Web App Manifest
- - icon: 💬
- title: Prompt for new content
- details: Built-in support for Vanilla JavaScript, Vue 3, React, Svelte, SolidJS and Preact
- - icon: ⚙️
- title: Stale-while-revalidate
- details: Automatic reload when new content is available
- - icon: ✨
- title: Static assets handling
- details: Configure static assets for offline support
- - icon: 🐞
- title: Development Support
- details: Debug your custom service worker logic as you develop your application
-
----
diff --git a/docs/netlify.toml b/docs/netlify.toml
deleted file mode 100644
index 09ba9959..00000000
--- a/docs/netlify.toml
+++ /dev/null
@@ -1,42 +0,0 @@
-[build.environment]
- NPM_FLAGS = "--prefix=/dev/null"
- NODE_VERSION = "14"
-
-[build]
- publish = "dist"
- command = "npx pnpm i --store=node_modules/.pnpm-store && npx pnpm run build"
-
-[[redirects]]
- from = "/deployment/"
- to = "/deployment/index.html"
- status = 200
-
-[[redirects]]
- from = "/examples/"
- to = "/examples/index.html"
- status = 200
-
-[[redirects]]
- from = "/frameworks/"
- to = "/frameworks/index.html"
- status = 200
-
-[[redirects]]
- from = "/guide/"
- to = "/guide/index.html"
- status = 200
-
-[[redirects]]
- from = "/workbox/"
- to = "/workbox/index.html"
- status = 200
-
-[[redirects]]
- from = "/*"
- to = "/index.html"
- status = 200
-
-[[headers]]
- for = "/manifest.webmanifest"
- [headers.values]
- Content-Type = "application/manifest+json"
diff --git a/docs/package.json b/docs/package.json
deleted file mode 100644
index c9639fe6..00000000
--- a/docs/package.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "name": "vite-plugin-pwa-docs",
- "version": "0.0.0",
- "private": "true",
- "type": "module",
- "scripts": {
- "dev": "vitepress dev",
- "build": "vitepress build && esno scripts/build.ts",
- "preview": "npm run build && vitepress serve",
- "serve": "npm run build && serve .vitepress/dist"
- },
- "dependencies": {
- "@vueuse/core": "^9.2.0",
- "@vueuse/shared": "^9.2.0"
- },
- "devDependencies": {
- "@types/fs-extra": "^9.0.13",
- "@vitejs/plugin-vue": "^3.1.0",
- "@vueuse/core": "^9.2.0",
- "esbuild-register": "^3.3.3",
- "eslint": "^8.54.0",
- "fast-glob": "^3.2.11",
- "fs-extra": "^10.1.0",
- "https-localhost": "^4.7.1",
- "typescript": "^4.8.2",
- "unocss": "^0.45.18",
- "unplugin-vue-components": "^0.22.4",
- "vite-plugin-pwa": "workspace:*",
- "vitepress": "1.0.1",
- "workbox-window": "^7.3.0"
- }
-}
diff --git a/docs/plugins/navbar.ts b/docs/plugins/navbar.ts
deleted file mode 100644
index 7629b451..00000000
--- a/docs/plugins/navbar.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import type { Plugin } from 'vite'
-
-export default function NavbarFix(): Plugin {
- return {
- name: 'vitepress-sidebar-logo-fix',
- enforce: 'pre',
- transform(code, id) {
- if (id.includes('VPNavBarTitle.vue') && !id.endsWith('.css') && !id.includes('&setup=')) {
- return `
-
-
-
-