first pass analytics redo

This commit is contained in:
George Powell committed 2026-09-22 12:15:56 -04:00
1 parent b656fd04c0
commit 45ffa39f2a
69 files changed
+6400 -1138

No files matched your search

+16 -5
View File
@@ -1,10 +1,21 @@
import tailwindcss from '@tailwindcss/vite';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { defineConfig, loadEnv } from 'vite';
export default defineConfig({
plugins: [tailwindcss(), sveltekit()],
server: {
allowedHosts: ['bibdle.com']
export default defineConfig(({ mode }) => {
// SvelteKit evaluates server modules during the build, and `$lib/server/db`
// requires DATABASE_URL at import time. Bun does not always surface the
// auto-loaded `.env` to Vite's build workers, so copy `.env` values into
// `process.env` here (without overriding a real environment variable).
const env = loadEnv(mode, process.cwd(), '');
for (const [key, value] of Object.entries(env)) {
if (process.env[key] === undefined) process.env[key] = value;
}
return {
plugins: [tailwindcss(), sveltekit()],
server: {
allowedHosts: ['bibdle.com']
}
};
});