an appview-less Bluesky client using Constellation and PDS Queries reddwarf.app
frontend spa bluesky reddwarf microcosm
at button 1.6 kB view raw
1import { resolve } from "node:path"; 2 3import tailwindcss from "@tailwindcss/vite"; 4import { TanStackRouterVite } from "@tanstack/router-plugin/vite"; 5import viteReact from "@vitejs/plugin-react"; 6import AutoImport from 'unplugin-auto-import/vite' 7import IconsResolver from 'unplugin-icons/resolver' 8import Icons from 'unplugin-icons/vite' 9import { defineConfig } from "vite"; 10 11import { generateMetadataPlugin } from "./oauthdev.mts"; 12 13const PROD_URL = "https://reddwarf.app" 14const DEV_URL = "https://local3768forumtest.whey.party" 15 16function shp(url: string): string { 17 return url.replace(/^https?:\/\//, ''); 18} 19 20// https://vitejs.dev/config/ 21export default defineConfig({ 22 plugins: [ 23 generateMetadataPlugin({ 24 prod: PROD_URL, 25 dev: DEV_URL, 26 }), 27 TanStackRouterVite({ autoCodeSplitting: true }), 28 viteReact({ 29 babel: { 30 plugins: ['babel-plugin-react-compiler'], 31 }, 32 }), 33 tailwindcss(), 34 AutoImport({ 35 include: [ 36 /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx 37 ], 38 resolvers: [ 39 IconsResolver({ 40 prefix: 'Icon', 41 extension: 'jsx', 42 enabledCollections: ['mdi','material-symbols'], 43 }), 44 ], 45 dts: 'src/auto-imports.d.ts', 46 }), 47 Icons({ 48 //autoInstall: true, 49 compiler: 'jsx', 50 jsx: 'react' 51 }), 52 ], 53 // test: { 54 // globals: true, 55 // environment: 'jsdom', 56 // }, 57 resolve: { 58 alias: { 59 "@": resolve(__dirname, "./src"), 60 "~": resolve(__dirname, "./src"), 61 }, 62 }, 63 server: { 64 allowedHosts: [shp(PROD_URL),shp(DEV_URL)], 65 }, 66 css: { 67 devSourcemap: true, 68 }, 69});