mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-30 11:25:38 +08:00
feat: add PWA support
This commit is contained in:
parent
597c25fa74
commit
a8c9c21898
@ -49,6 +49,7 @@
|
|||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"vite": "^4.4.9",
|
"vite": "^4.4.9",
|
||||||
|
"vite-plugin-pwa": "^0.16.4",
|
||||||
"vite-plugin-solid": "^2.7.0",
|
"vite-plugin-solid": "^2.7.0",
|
||||||
"zod": "^3.22.2"
|
"zod": "^3.22.2"
|
||||||
}
|
}
|
||||||
|
2665
pnpm-lock.yaml
2665
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,14 @@
|
|||||||
import { defineConfig, splitVendorChunkPlugin } from 'vite'
|
import { defineConfig, splitVendorChunkPlugin } from 'vite'
|
||||||
|
import { VitePWA } from 'vite-plugin-pwa'
|
||||||
import solidPlugin from 'vite-plugin-solid'
|
import solidPlugin from 'vite-plugin-solid'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
base: './',
|
base: './',
|
||||||
build: { chunkSizeWarningLimit: 1000 },
|
build: { chunkSizeWarningLimit: 1000 },
|
||||||
resolve: { alias: { '~': '/src' } },
|
resolve: { alias: { '~': '/src' } },
|
||||||
plugins: [solidPlugin(), splitVendorChunkPlugin()],
|
plugins: [
|
||||||
|
solidPlugin(),
|
||||||
|
splitVendorChunkPlugin(),
|
||||||
|
VitePWA({ registerType: 'autoUpdate' }),
|
||||||
|
],
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user