0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch.git synced 2024-12-22 13:22:58 -05:00
safetwitch/vite.config.ts

34 lines
785 B
TypeScript
Raw Normal View History

2023-03-07 01:19:05 -05:00
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
2023-06-13 11:08:43 -05:00
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import { dirname, resolve } from 'node:path'
2023-08-18 13:21:31 -05:00
import { gitDescribeSync } from 'git-describe'
// Footer version
const gitVer = gitDescribeSync()
process.env.SAFETWITCH_COMMIT_HASH = gitVer.hash
process.env.SAFETWITCH_TAG = gitVer.tag!
2023-03-07 01:19:05 -05:00
// https://vitejs.dev/config/
export default defineConfig({
2023-06-13 11:08:43 -05:00
plugins: [
vue(),
VueI18nPlugin({
include: resolve(dirname(fileURLToPath(import.meta.url)), './src/locales/**'),
})
],
2023-03-07 01:19:05 -05:00
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
2023-03-19 18:52:28 -05:00
},
build: {
2023-06-13 15:01:06 -05:00
cssCodeSplit: true
2023-06-13 11:08:43 -05:00
},
envPrefix: 'SAFETWITCH_',
2023-03-07 01:19:05 -05:00
})
2023-08-18 13:21:31 -05:00