Skip to content

Import a 3D Model and automatically assign and export animations

TypeScript

Just bring back a couple environment variables that might be useful

Scott Petrovic43a583d032f4
diff --git a/src/environment.js b/src/environment.js
index 3bb3bef..62b5390 100644
--- a/src/environment.js
+++ b/src/environment.js
@@ -1,4 +1,7 @@
export const build_version = '0.0.0'
-// expose all Cloudflare environment variables to client
-window.PROCESS_ENV = PROCESS_ENV
+// grab a couple environment variables from Clourflare build process
+// Vite actually does the injection, so look at vite.config.js with the "define" block
+window.CLOUDFLARE_COMMIT_SHA = PROCESS_ENV.WORKERS_CI_COMMIT_SHA
+window.CLOUDFLARE_BRANCH = PROCESS_ENV.WORKERS_CI_BRANCH || 'unknown'
+