~starkingdoms/starkingdoms

ref: cc6dfa91318c6269cb544d287a68646e6b5f9eb4 starkingdoms/starkingdoms-client/vite.config.ts -rw-r--r-- 486 bytes
cc6dfa91 — core HMR for CSS, update deps on twite 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import {defineConfig} from "vite";
import * as child from "child_process";

const commitHash = child.execSync('git describe --no-match --always --abbrev=8 --dirty').toString().trim();

export default defineConfig({
    plugins: [],
    define: {
        APP_VERSION: JSON.stringify(process.env.npm_package_version),
        COMMIT_HASH: JSON.stringify(commitHash)
    },
    build: {
        target: ['chrome89', 'edge89', 'firefox89', 'safari15'],
        cssCodeSplit: false,
    }
})