mirror of
https://github.com/pupperpowell/bibdle.git
synced 2026-10-22 05:54:10 -04:00
first pass analytics redo
This commit is contained in:
1 parent
b656fd04c0
commit
45ffa39f2a
69 files changed
+6400
-1138
No files matched your search
+16
-5
@@ -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']
|
||||
}
|
||||
};
|
||||
});
|
||||
Reference in new issue
Block a user