| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- import { defineConfig } from "vite";
- import { fresh } from "@fresh/plugin-vite";
- import tailwindcss from "@tailwindcss/vite";
- import { VitePWA } from "vite-plugin-pwa";
- export default defineConfig({
- plugins: [
- fresh(),
- tailwindcss(),
- VitePWA({
- registerType: "autoUpdate",
- manifest: {
- name: "Postdown",
- short_name: "Postdown",
- description: "A web-based, shareable, self-hosted Markdown editor",
- start_url: "/",
- display: "standalone",
- background_color: "#ffffff",
- theme_color: "#1e293b",
- orientation: "any",
- icons: [
- {
- src: "/icon-192.png",
- sizes: "192x192",
- type: "image/png",
- },
- {
- src: "/icon-512.png",
- sizes: "512x512",
- type: "image/png",
- },
- ],
- },
- workbox: {
- navigateFallback: "/",
- runtimeCaching: [
- {
- urlPattern: /^https?:\/\/.*\/.*/i,
- handler: "NetworkFirst",
- options: {
- cacheName: "postdown-runtime",
- expiration: {
- maxEntries: 100,
- },
- },
- },
- ],
- },
- }),
- ],
- server: {
- port: 8000,
- watch: {
- ignored: ["**/data/**"],
- },
- },
- });
|