-
Notifications
You must be signed in to change notification settings - Fork 3
/
vite.config.js
39 lines (39 loc) · 1.09 KB
/
vite.config.js
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
35
36
37
38
39
import { defineConfig } from 'vite';
import reactRefresh from '@vitejs/plugin-react-refresh';
import eslintPlugin from 'vite-plugin-eslint';
import ViteFonts from 'vite-plugin-fonts';
import { minifyHtml, injectHtml } from 'vite-plugin-html';
// https://vitejs.dev/config/
export default defineConfig({
base: '',
plugins: [
reactRefresh(),
eslintPlugin({
include: 'src/**/*.+(js|jsx)',
fix: true,
}),
ViteFonts({
google: {
families: [
{
name: 'Karla',
styles: 'wght@400;700',
},
{
name: 'Lato',
styles: 'wght@400;700;900',
},
],
},
}),
minifyHtml(),
injectHtml({
injectData: {
commitHash: require('child_process')
.execSync('git rev-parse HEAD')
.toString()
.trim(),
},
}),
],
});