add more configuration
This commit is contained in:
@ -29,6 +29,11 @@ export default defineConfig(({ command, mode, ssrBuild }) => {
|
|||||||
plugins: [
|
plugins: [
|
||||||
viteCompression(),
|
viteCompression(),
|
||||||
VitePWA({
|
VitePWA({
|
||||||
|
workbox: {
|
||||||
|
sourcemap: true,
|
||||||
|
cleanupOutdatedCaches: true,
|
||||||
|
globPatterns: ["**/*.{js,css,html,ico,png,svg}"],
|
||||||
|
},
|
||||||
includeAssets: [
|
includeAssets: [
|
||||||
"favicon/favicon.icon",
|
"favicon/favicon.icon",
|
||||||
"favicon/apple-touch-icon.png",
|
"favicon/apple-touch-icon.png",
|
||||||
@ -36,6 +41,7 @@ export default defineConfig(({ command, mode, ssrBuild }) => {
|
|||||||
],
|
],
|
||||||
manifest: webManifest,
|
manifest: webManifest,
|
||||||
registerType: "autoUpdate",
|
registerType: "autoUpdate",
|
||||||
|
injectRegister: "auto",
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
assetsInclude: ["**/*.md"],
|
assetsInclude: ["**/*.md"],
|
||||||
@ -49,6 +55,11 @@ export default defineConfig(({ command, mode, ssrBuild }) => {
|
|||||||
plugins: [
|
plugins: [
|
||||||
viteCompression(),
|
viteCompression(),
|
||||||
VitePWA({
|
VitePWA({
|
||||||
|
workbox: {
|
||||||
|
sourcemap: true,
|
||||||
|
cleanupOutdatedCaches: true,
|
||||||
|
globPatterns: ["**/*.{js,css,html,ico,png,svg}"],
|
||||||
|
},
|
||||||
includeAssets: [
|
includeAssets: [
|
||||||
"favicon/favicon.icon",
|
"favicon/favicon.icon",
|
||||||
"favicon/apple-touch-icon.png",
|
"favicon/apple-touch-icon.png",
|
||||||
@ -56,6 +67,7 @@ export default defineConfig(({ command, mode, ssrBuild }) => {
|
|||||||
],
|
],
|
||||||
manifest: webManifest,
|
manifest: webManifest,
|
||||||
registerType: "autoUpdate",
|
registerType: "autoUpdate",
|
||||||
|
injectRegister: "auto",
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
chunkSizeWarningLimit: 1600 * 2,
|
chunkSizeWarningLimit: 1600 * 2,
|
||||||
|
|||||||
Reference in New Issue
Block a user