-
Notifications
You must be signed in to change notification settings - Fork 11
/
vite.config.ts
34 lines (32 loc) · 894 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import childProcess from 'node:child_process';
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
import devtools from 'solid-devtools/vite';
import UnoCSS from 'unocss/vite';
import { viteStaticCopy } from 'vite-plugin-static-copy';
let GIT_REVISION = 'unknown'
try { GIT_REVISION = childProcess.execSync("git rev-parse HEAD").toString().trim() } catch { }
export default defineConfig({
plugins: [
UnoCSS(),
/*
Uncomment the following line to enable solid-devtools.
For more info see https://github.com/thetarnav/solid-devtools/tree/main/packages/extension#readme
*/
devtools(),
solidPlugin(),
viteStaticCopy({
targets: [{ src: './LICENSE', dest: './' }]
})
],
server: {
port: 3000,
},
base: './',
build: {
target: 'esnext',
},
define: {
GIT_REVISION: JSON.stringify(GIT_REVISION)
}
});