From 659304ebd228ca4b5234d316997f3bd92d37e640 Mon Sep 17 00:00:00 2001 From: b1ek Date: Wed, 17 May 2023 14:44:01 +1000 Subject: [PATCH] add compile time defines --- pairent_frontend_react/vite.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pairent_frontend_react/vite.config.js b/pairent_frontend_react/vite.config.js index c88c8e3..addf672 100644 --- a/pairent_frontend_react/vite.config.js +++ b/pairent_frontend_react/vite.config.js @@ -1,8 +1,13 @@ import react from '@vitejs/plugin-react' +import * as child from 'child_process'; /** @type {import('vite').UserConfig} */ export default { plugins: [ react() - ], + ], + define: { + BUILD_TIME: new Date(), + // LAST_COMMIT: JSON.stringify(child.execSync("git rev-parse --short HEAD")) + } } \ No newline at end of file