mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 02:11:57 +00:00
Add __commit_hash_ vite define
This commit is contained in:
parent
e2eff62f29
commit
8bc5047d60
2
src/env.d.ts
vendored
2
src/env.d.ts
vendored
|
@ -10,3 +10,5 @@ interface ImportMetaEnv extends Readonly<Record<string, string>> {
|
|||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
|
||||
declare const __COMMIT_HASH__: string;
|
||||
|
|
|
@ -6,9 +6,15 @@ import Components from 'unplugin-vue-components/vite';
|
|||
import IconsResolve from 'unplugin-icons/resolver';
|
||||
import AutoImport from 'unplugin-auto-import/vite';
|
||||
import { BootstrapVueNextResolver } from 'unplugin-vue-components/resolvers';
|
||||
import { execSync } from 'child_process';
|
||||
|
||||
const commitHash = execSync('git rev-parse --short HEAD').toString();
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
define: {
|
||||
__COMMIT_HASH__: JSON.stringify(commitHash),
|
||||
},
|
||||
plugins: [
|
||||
createVuePlugin({
|
||||
script: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user