We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07cec1d commit 9cf77adCopy full SHA for 9cf77ad
astro.config.mjs
@@ -11,12 +11,19 @@ import metaTags from "astro-meta-tags";
11
import pagefind from "astro-pagefind";
12
import deleteUnusedImages from "astro-delete-unused-images";
13
import preload from "astro-preload";
14
+import { execSync } from "node:child_process";
15
16
// https://astro.build/config
17
export default defineConfig({
18
vite: {
19
define: {
- "process.env.VITE_BUILD_TIME": JSON.stringify(new Date().toISOString()),
20
+ "import.meta.env.TIMESTAMP": new Date()
21
+ .toISOString()
22
+ .replace(/[-:T.Z]/g, "")
23
+ .slice(0, 14),
24
+ "import.meta.env.GIT_VERSION": new String(
25
+ execSync("git rev-parse --short HEAD")
26
+ ),
27
},
28
resolve: {
29
alias: {
0 commit comments