feat: add pwa out of box.

This commit is contained in:
Yufan Sheng 2025-01-13 08:15:33 +08:00
parent b9f6571d29
commit 94b3b9b648
Signed by: syhily
GPG Key ID: 9D18A22A7DCD5A9B
3 changed files with 4716 additions and 4 deletions

View File

@ -7,6 +7,7 @@ import {
transformerNotationHighlight, transformerNotationHighlight,
transformerNotationWordHighlight, transformerNotationWordHighlight,
} from '@shikijs/transformers'; } from '@shikijs/transformers';
import AstroPWA from '@vite-pwa/astro';
import { uploader } from 'astro-uploader'; import { uploader } from 'astro-uploader';
import { defineConfig, envField } from 'astro/config'; import { defineConfig, envField } from 'astro/config';
import rehypeAutolinkHeadings from 'rehype-autolink-headings'; import rehypeAutolinkHeadings from 'rehype-autolink-headings';
@ -48,6 +49,7 @@ export default defineConfig({
validateSecrets: true, validateSecrets: true,
}, },
integrations: [ integrations: [
AstroPWA(),
mdx({ mdx({
remarkPlugins: [astroImage], remarkPlugins: [astroImage],
rehypePlugins: [ rehypePlugins: [

4717
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -69,6 +69,7 @@
"@types/pg": "^8.11.10", "@types/pg": "^8.11.10",
"@types/qrcode-svg": "^1.1.5", "@types/qrcode-svg": "^1.1.5",
"@types/unist": "^3.0.3", "@types/unist": "^3.0.3",
"@vite-pwa/astro": "^0.5.0",
"astro-netease-player": "^1.0.2", "astro-netease-player": "^1.0.2",
"astro-uploader": "^1.2.3", "astro-uploader": "^1.2.3",
"bootstrap": "^5.3.3", "bootstrap": "^5.3.3",