add compile time defines

This commit is contained in:
b1ek 2023-05-17 14:44:01 +10:00
parent 3c7cf9918a
commit 659304ebd2
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 6 additions and 1 deletions

View File

@ -1,8 +1,13 @@
import react from '@vitejs/plugin-react' import react from '@vitejs/plugin-react'
import * as child from 'child_process';
/** @type {import('vite').UserConfig} */ /** @type {import('vite').UserConfig} */
export default { export default {
plugins: [ plugins: [
react() react()
], ],
define: {
BUILD_TIME: new Date(),
// LAST_COMMIT: JSON.stringify(child.execSync("git rev-parse --short HEAD"))
}
} }