Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sovereign-intelligence/blob/main/docs/archive/drakestapleton.com-old/vite.config.ts # sovereign-intelligence Front door to Drake Stapleton's sovereign stack. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `sovereign-intelligence / docs / archive / drakestapleton.com-old / vite.config.ts` 40 lines ยท 1053 bytes Raw Blame History 1 import { defineConfig, type Plugin } from "vite"; 2 import react from "@vitejs/plugin-react"; 3 import { fileURLToPath, URL } from "node:url"; 4 import pageMetadata from "./site-metadata.json"; 5 6 function siteMetadata(development: boolean): Plugin { 7 const home = pageMetadata["/"]; 8 9 const values = { 10 __SITE_MODE__: "portfolio", 11 __SITE_ROBOTS__: "index, follow", 12 __SITE_STYLE_SRC__: development ? "style-src 'self' 'unsafe-inline'" : "style-src 'self'", 13 __SITE_TITLE__: home.title, 14 __SITE_DESCRIPTION__: home.description, 15 }; 16 17 return { 18 name: "site-metadata", 19 transformIndexHtml(html) { 20 return Object.entries(values).reduce( 21 (result, [token, value]) => result.replaceAll(token, value), 22 html, 23 ); 24 }, 25 }; 26 } 27 28 export default defineConfig(({ command }) => ({ 29 plugins: [siteMetadata(command === "serve"), react()], 30 resolve: { 31 alias: { 32 "@": fileURLToPath(new URL("./src", import.meta.url)), 33 }, 34 }, 35 build: { 36 sourcemap: true, 37 outDir: "dist", 38 emptyOutDir: true, 39 }, 40 }));