pashto-dictionary/website/vite.config.ts

84 lines
2.2 KiB
TypeScript
Raw Permalink Normal View History

2024-08-14 19:30:10 +00:00
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
2024-08-15 13:27:23 +00:00
import { VitePWA } from "vite-plugin-pwa";
2024-08-14 19:30:10 +00:00
// https://vitejs.dev/config/
export default defineConfig({
2024-08-15 13:27:23 +00:00
plugins: [
react(),
VitePWA({
strategies: "injectManifest",
srcDir: "src",
// using old service worker from create-react-app version
filename: "service-worker.ts",
manifestFilename: "manifest.json",
manifest: {
short_name: "Pashto Dictionary",
name: "LingDocs Pashto Dictionary",
id: "/",
icons: [
{
src: "/icons/android-chrome-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "/icons/android-chrome-512x512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "/icons/maskable_icon_x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
{
src: "/icons/maskable_icon_x1024.png",
sizes: "1024x1024",
type: "image/png",
purpose: "maskable",
},
{
src: "/icons/android-chrome-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
],
display: "standalone",
theme_color: "#596267",
background_color: "#f9f9f9",
start_url: ".",
description:
"An offline Pashto Dictionary app with audio, approximate search-as-you-type, alphabetical browsing, verb conjugation, inflections, and a phrase generation engine.",
launch_handler: {
client_mode: "auto",
},
categories: [
"education",
"language",
"productivity",
"language learning",
"Pashto",
"dictionaries",
],
lang: "en",
prefer_related_applications: false,
share_target: {
action: "/share-target",
method: "GET",
params: {
title: "title",
text: "text",
url: "url",
},
},
},
}),
],
build: {
sourcemap: false,
},
2024-08-14 19:30:10 +00:00
});