mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-03-17 21:31:43 +01:00
dont load ackee script when running locally
This commit is contained in:
parent
37489e523a
commit
a6524e3030
@ -20,13 +20,7 @@
|
||||
content="https://repository-images.githubusercontent.com/581644549/d5eec580-ba3d-41e8-87db-58c313bf3f45"
|
||||
/>
|
||||
|
||||
<script
|
||||
async
|
||||
defer
|
||||
src="https://ackee.nostrudel.ninja/tracker.js"
|
||||
data-ackee-server="https://ackee.nostrudel.ninja"
|
||||
data-ackee-domain-id="58b1c39f-43f9-422b-bc7d-06aff35e764e"
|
||||
></script>
|
||||
%VITE_ANALYTICS_SCRIPT%
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
@ -2,6 +2,17 @@ import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { VitePWA } from "vite-plugin-pwa";
|
||||
|
||||
const isProd = process.env.NODE_ENV === "production";
|
||||
process.env.VITE_ANALYTICS_SCRIPT = isProd
|
||||
? `
|
||||
<script
|
||||
async defer
|
||||
src="https://ackee.nostrudel.ninja/tracker.js"
|
||||
data-ackee-server="https://ackee.nostrudel.ninja"
|
||||
data-ackee-domain-id="58b1c39f-43f9-422b-bc7d-06aff35e764e"
|
||||
></script>`
|
||||
: "";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
base: process.env.VITE_BASE ?? "/",
|
||||
|
Loading…
x
Reference in New Issue
Block a user