We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8fad4d commit 01513fbCopy full SHA for 01513fb
1 file changed
src/layouts/BaseLayout.astro
@@ -4,6 +4,7 @@ export interface Props {
4
}
5
6
const { title } = Astro.props;
7
+const isProd = import.meta.env.PROD;
8
---
9
10
<!doctype html>
@@ -14,11 +15,17 @@ const { title } = Astro.props;
14
15
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
16
<meta name="generator" content={Astro.generator} />
17
<title>{title}</title>
- <script
18
- type="text/partytown"
19
- defer
20
- data-domain="milan-codes.github.io"
21
- src="https://plausible.io/js/script.js"></script>
+ {
+ isProd && (
+ <script
+ type="text/partytown"
22
+ defer
23
+ data-domain="milan-codes.github.io"
24
+ src="https://plausible.io/js/script.js"
25
+ is:inline
26
+ />
27
+ )
28
+ }
29
</head>
30
<body class="max-w-lg mx-auto px-4 bg-gray-50 dark:bg-[#0a0a0a]">
31
<slot />
0 commit comments