init
This commit is contained in:
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
import type { NuxtI18nOptions } from "@nuxtjs/i18n";
|
||||
|
||||
export const i18n: NuxtI18nOptions = {
|
||||
defaultLocale: "en",
|
||||
strategy: "prefix_and_default",
|
||||
locales: [
|
||||
{
|
||||
code: "en",
|
||||
name: "English",
|
||||
icon: "i-icon-park-outline:english",
|
||||
file: "en.yaml"
|
||||
},
|
||||
{
|
||||
code: "sp",
|
||||
name: "Spanish",
|
||||
icon: "i-material-symbols:language-spanish",
|
||||
file: "sp.yaml"
|
||||
},
|
||||
{
|
||||
code: "zh-cn",
|
||||
name: "简体中文",
|
||||
icon: "i-icon-park-outline:chinese",
|
||||
file: "zh-cn.yaml"
|
||||
}
|
||||
],
|
||||
langDir: "i18n",
|
||||
compilation: {
|
||||
strictMessage: false
|
||||
}
|
||||
};
|
||||
Vendored
+56
@@ -0,0 +1,56 @@
|
||||
import type { ModuleOptions } from "@vite-pwa/nuxt";
|
||||
|
||||
const scope = "/";
|
||||
|
||||
export const pwa: ModuleOptions = {
|
||||
registerType: "autoUpdate",
|
||||
scope,
|
||||
base: scope,
|
||||
manifest: {
|
||||
id: scope,
|
||||
scope,
|
||||
name: "Oh My CV!",
|
||||
short_name: "Oh My CV!",
|
||||
icons: [
|
||||
{
|
||||
src: "/pwa-192x192.png",
|
||||
sizes: "192x192",
|
||||
type: "image/png"
|
||||
},
|
||||
{
|
||||
src: "/pwa-512x512.png",
|
||||
sizes: "512x512",
|
||||
type: "image/png"
|
||||
},
|
||||
{
|
||||
src: "/favicon.svg",
|
||||
sizes: "512x512",
|
||||
type: "image/svg",
|
||||
purpose: "any maskable"
|
||||
}
|
||||
]
|
||||
},
|
||||
workbox: {
|
||||
globPatterns: ["**/*.{js,css,html,otf,ttf,woff2,png,svg}"],
|
||||
maximumFileSizeToCacheInBytes: 16000000,
|
||||
cleanupOutdatedCaches: true,
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: /^https:\/\/fonts.googleapis.com\/.*/i,
|
||||
handler: "CacheFirst",
|
||||
options: {
|
||||
cacheName: "google-fonts-cache",
|
||||
expiration: {
|
||||
maxEntries: 10,
|
||||
maxAgeSeconds: 60 * 60 * 24 * 365 // <== 365 days
|
||||
},
|
||||
cacheableResponse: {
|
||||
statuses: [0, 200]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
registerWebManifestInRouteRules: true,
|
||||
writePlugin: true
|
||||
};
|
||||
Reference in New Issue
Block a user