Monorepo for Tangled tangled.org
1

Configure Feed

Select the types of activity you want to include in your feed.

core / web / vite.config.ts
1.5 kB 53 lines
1import tailwindcss from '@tailwindcss/vite'; 2import { sveltekit } from '@sveltejs/kit/vite'; 3import Icons from 'unplugin-icons/vite'; 4import { defineConfig } from 'vitest/config'; 5import oauthMetadata from './static/oauth-client-metadata.json'; 6 7const devHost = '127.0.0.1'; 8const devPort = 5173; 9const devRedirectUri = `http://${devHost}:${devPort}/oauth/callback`; 10const devClientId = `http://localhost?redirect_uri=${encodeURIComponent(devRedirectUri)}&scope=${encodeURIComponent(oauthMetadata.scope)}`; 11 12export default defineConfig({ 13 plugins: [ 14 { 15 name: 'oauth-env', 16 config(_config, { command }) { 17 process.env.VITE_OAUTH_CLIENT_ID ??= 18 command === 'serve' ? devClientId : oauthMetadata.client_id; 19 process.env.VITE_OAUTH_REDIRECT_URI ??= 20 command === 'serve' ? devRedirectUri : oauthMetadata.redirect_uris[0]; 21 process.env.VITE_OAUTH_SCOPE ??= oauthMetadata.scope; 22 process.env.VITE_TANGLED_APPVIEW_SERVICE ??= 'https://bobbin.klbr.net'; 23 } 24 }, 25 tailwindcss(), 26 Icons({ compiler: 'svelte' }), 27 sveltekit() 28 ], 29 resolve: { 30 alias: { 31 '$icon/': '~icons/lucide/' 32 } 33 }, 34 server: { 35 host: devHost, 36 port: devPort, 37 strictPort: true 38 }, 39 test: { 40 expect: { requireAssertions: true }, 41 projects: [ 42 { 43 extends: './vite.config.ts', 44 test: { 45 name: 'server', 46 environment: 'node', 47 include: ['src/**/*.{test,spec}.{js,ts}'], 48 exclude: ['src/**/*.svelte.{test,spec}.{js,ts}'] 49 } 50 } 51 ] 52 } 53});