58 lines
1.2 KiB
TypeScript
58 lines
1.2 KiB
TypeScript
import { VitePWA } from "vite-plugin-pwa";
|
|
import { defineConfig } from "vite";
|
|
import path from "path";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
"~": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
|
|
plugins: [
|
|
TanStackRouterVite({
|
|
target: "react",
|
|
autoCodeSplitting: false,
|
|
routesDirectory: "./src/app",
|
|
generatedRouteTree: "./src/app/-route-tree.gen.ts",
|
|
routeFileIgnorePrefix: "-",
|
|
quoteStyle: "double",
|
|
}),
|
|
react(),
|
|
VitePWA({
|
|
registerType: "prompt",
|
|
injectRegister: false,
|
|
|
|
pwaAssets: {
|
|
disabled: false,
|
|
config: true,
|
|
},
|
|
|
|
manifest: {
|
|
name: "MarkOne",
|
|
short_name: "MarkOne",
|
|
description: "A minimal bookmark manager",
|
|
theme_color: "#ffffff",
|
|
},
|
|
|
|
workbox: {
|
|
globPatterns: ["**/*.{js,css,html,svg,png,ico}"],
|
|
cleanupOutdatedCaches: true,
|
|
clientsClaim: true,
|
|
},
|
|
|
|
devOptions: {
|
|
enabled: false,
|
|
navigateFallback: "index.html",
|
|
suppressWarnings: true,
|
|
type: "module",
|
|
},
|
|
}),
|
|
tailwindcss(),
|
|
],
|
|
});
|