add manifest

This commit is contained in:
Arthur Barre 2025-03-11 13:57:07 +01:00
parent 8228fe865f
commit c1456eec18
8 changed files with 2730 additions and 10 deletions

View File

@ -33,7 +33,8 @@
"react-router-dom": "^7.3.0", "react-router-dom": "^7.3.0",
"tailwind-merge": "^3.0.2", "tailwind-merge": "^3.0.2",
"tailwindcss": "^4.0.12", "tailwindcss": "^4.0.12",
"tailwindcss-animate": "^1.0.7" "tailwindcss-animate": "^1.0.7",
"vite-plugin-pwa": "^0.21.1"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.21.0", "@eslint/js": "^9.21.0",

2692
frontend/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -2,10 +2,53 @@ import path from "path"
import tailwindcss from "@tailwindcss/vite" import tailwindcss from "@tailwindcss/vite"
import react from "@vitejs/plugin-react" import react from "@vitejs/plugin-react"
import { defineConfig } from "vite" import { defineConfig } from "vite"
import { VitePWA } from "vite-plugin-pwa";
// you can copy the base structure of manifest object.
const manifestForPlugIn = {
registerType: 'prompt' as const,
includeAssests: ['favicon.ico', "apple-touc-icon.png", "masked-icon.svg"],
manifest: {
name: "Freedge",
short_name: "Freedge",
description: "Freedge est une application de recettes de cuisine générée par IA",
icons: [{
src: '/assets/192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'favicon'
},
{
src: '/assets/512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'favicon'
},
{
src: '/assets/180.png',
sizes: '180x180',
type: 'image/png',
purpose: 'apple touch icon',
},
{
src: '/assets/512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable',
}
],
theme_color: '#171717',
background_color: '#f0e7db',
display: "standalone",
scope: '/',
start_url: "/",
orientation: 'portrait' as const
}
}
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react(), tailwindcss()], plugins: [react(), tailwindcss(), VitePWA(manifestForPlugIn)],
resolve: { resolve: {
alias: { alias: {
"@": path.resolve(__dirname, "./src"), "@": path.resolve(__dirname, "./src"),