snowballtools-base-mirror/packages/frontend/vite.config.ts

25 lines
623 B
TypeScript
Raw Normal View History

import { defineConfig, PluginOption } from 'vite';
2024-04-24 17:18:59 +00:00
import react from '@vitejs/plugin-react';
2024-06-04 17:03:22 +00:00
import { exec } from 'child_process';
import { promisify } from 'util';
2024-04-11 21:40:22 +00:00
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()] as PluginOption[],
2024-04-11 21:40:22 +00:00
resolve: {
alias: {
2024-04-24 17:18:59 +00:00
utils: '/src/utils',
assets: '/src/assets',
context: '/src/context',
components: '/src/components',
2024-05-14 17:07:32 +00:00
pages: '/src/pages',
2024-04-11 21:40:22 +00:00
},
},
2024-04-24 17:18:18 +00:00
define: {
2024-04-25 00:02:52 +00:00
'process.env': {},
// __VERSION__: JSON.stringify(
// (await promisify(exec)('git rev-parse --short HEAD')).stdout.trim(),
// ),
2024-04-24 17:18:18 +00:00
},
2024-04-11 21:40:22 +00:00
});