-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
56 lines (54 loc) · 1.49 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/// <reference types="vitest" />
import path from 'node:path'
import react from '@vitejs/plugin-react-swc'
import { defineConfig } from 'vite'
import { VitePWA as pwa } from 'vite-plugin-pwa'
import svgr from 'vite-plugin-svgr'
import html_minify from './plugins/vite-plugin-devtuls-html-minify'
// https://vitejs.dev/config/
export default defineConfig({
base: '/devtuls/',
resolve: {
alias: {
'~': path.resolve(import.meta.dirname, 'src'),
},
},
test: {
clearMocks: true,
include: ['src/**/*.test.?(c|m)[jt]s?(x)'],
outputFile: {
html: 'vitest-report/index.html',
},
reporters: process.env.CI ? 'default' : ['default', 'html'],
coverage: {
enabled: true,
include: ['src/lib/**/*.{js,ts}'],
},
},
plugins: [
svgr(),
react(),
html_minify(),
pwa({
injectRegister: 'script-defer',
pwaAssets: { injectThemeColor: false },
manifest: {
name: 'Devtuls',
short_name: 'Devtuls',
description: 'Collection of awesome developer tools available as a progressive web application.',
background_color: 'transparent',
theme_color: 'transparent',
lang: 'en',
scope: '/devtuls/',
display: 'standalone',
dir: 'ltr',
start_url: '/devtuls/?standalone=true',
orientation: 'portrait-primary',
display_override: ['window-controls-overlay'],
screenshots: [],
shortcuts: [],
protocol_handlers: [],
},
}),
],
})