feat: add vite pwa plugin
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m36s
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m36s
This commit is contained in:
parent
a80b64dc4a
commit
2208b868c6
4 changed files with 2540 additions and 34 deletions
|
|
@ -49,14 +49,15 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@react-router/dev": "^7.5.3",
|
||||
"@tailwindcss/vite": "^4.1.4",
|
||||
"@tailwindcss/vite": "^4.1.11",
|
||||
"@types/luxon": "^3.7.0",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^19.1.2",
|
||||
"@types/react-dom": "^19.1.2",
|
||||
"tailwindcss": "^4.1.4",
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^6.3.3",
|
||||
"vite": "^7.0.6",
|
||||
"vite-plugin-pwa": "^1.0.2",
|
||||
"vite-tsconfig-paths": "^5.1.4"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2529
pnpm-lock.yaml
generated
2529
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
35
pwa.config.ts
Normal file
35
pwa.config.ts
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
export default {
|
||||
workbox: {
|
||||
importScripts: ["/sw/push.js"],
|
||||
},
|
||||
includeAssets: [
|
||||
"favicon.ico",
|
||||
"favicon-96x96.png",
|
||||
"web-app-manifest-192x192.png",
|
||||
"web-app-manifest-512x512.png",
|
||||
"apple-touch-icon.png",
|
||||
],
|
||||
registerType: "autoUpdate",
|
||||
manifest: {
|
||||
lang: "fr",
|
||||
name: "Khollisé ⚔️",
|
||||
short_name: "Khollisé",
|
||||
description: "BJColle but faster, better and prettier ⚡️",
|
||||
theme_color: "#0d0d0d",
|
||||
background_color: "#f4efe3",
|
||||
orientation: "portrait",
|
||||
display: "standalone",
|
||||
icons: [
|
||||
{
|
||||
src: "/web-app-manifest-192x192.png",
|
||||
sizes: "192x192",
|
||||
type: "image/png",
|
||||
},
|
||||
{
|
||||
src: "/web-app-manifest-512x512.png",
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -1,8 +1,11 @@
|
|||
import { reactRouter } from "@react-router/dev/vite";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import pwaConfig from "./pwa.config";
|
||||
import { defineConfig } from "vite";
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
import { VitePWA } from "vite-plugin-pwa";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [tailwindcss(), reactRouter(), tsconfigPaths()],
|
||||
// @ts-expect-error TODO: Fix type error with VitePWA
|
||||
plugins: [tailwindcss(), reactRouter(), tsconfigPaths(), VitePWA(pwaConfig)],
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue