analytics and embed meta update!!!

This commit is contained in:
legop3
2026-07-31 22:12:04 -04:00
parent 1aecab66e7
commit 8c5d98bed6
45 changed files with 395 additions and 699 deletions
+1 -15
View File
@@ -1,23 +1,9 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import fs from 'node:fs'
const ANALYTICS_PLACEHOLDER = '<!-- analytics:inject -->'
function analyticsTags() {
return {
name: 'analytics-tags',
transformIndexHtml(html) {
const tagsPath = new URL('./src/config/analytics.html', import.meta.url)
const tags = fs.existsSync(tagsPath) ? fs.readFileSync(tagsPath, 'utf8').trim() : ''
return html.replace(ANALYTICS_PLACEHOLDER, tags)
},
}
}
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), analyticsTags()],
plugins: [react()],
server: {
// Listen on every local interface during development so a phone or tablet
// on the same LAN can load the touch UI using this machine's network IP.