mirror of
https://github.com/iib0011/omni-tools.git
synced 2026-11-20 21:23:09 +03:00
chore: last commit hash added to env var
This commit is contained in:
1 parent
5371720dbb
commit
aee9ec4d5d
2 files changed
+6
-1
No files matched your search
Vendored
+1
@@ -1 +1,2 @@
|
||||
declare const __APP_VERSION__: string;
|
||||
declare const __COMMIT_HASH__: string;
|
||||
+5
-1
@@ -3,13 +3,17 @@ import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react-swc';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
import packageJson from './package.json';
|
||||
import { execSync } from 'node:child_process';
|
||||
|
||||
const commitHash = execSync('git rev-parse --short HEAD').toString().trim();
|
||||
|
||||
// https://vitejs.dev/config https://vitest.dev/config
|
||||
export default defineConfig({
|
||||
plugins: [react(), tsconfigPaths()],
|
||||
define: {
|
||||
'process.env': {},
|
||||
__APP_VERSION__: JSON.stringify(packageJson.version)
|
||||
__APP_VERSION__: JSON.stringify(packageJson.version),
|
||||
__COMMIT_HASH__: JSON.stringify(commitHash)
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ['@ffmpeg/ffmpeg', '@ffmpeg/util']
|
||||
|
||||
Reference in new issue
Block a user