-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
96 lines (95 loc) · 2.21 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig } from 'vite';
import eslint from 'vite-plugin-eslint';
import { VitePWA } from 'vite-plugin-pwa';
import svgr from 'vite-plugin-svgr';
export default defineConfig({
build: {
outDir: 'build',
},
plugins: [
react(),
eslint({
failOnError: false,
failOnWarning: false,
exclude: ['/virtual:/**', 'node_modules/**'],
}),
svgr(),
VitePWA({
registerType: 'prompt',
injectRegister: 'script',
strategies: 'injectManifest',
injectManifest: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2,otf}'],
},
srcDir: 'src',
filename: 'serviceWorker.ts',
manifest: {
short_name: '고민의 참견',
name: '고민의 참견, 고참',
icons: [
{
src: 'icon/android/icon-36.png',
sizes: '36x36',
type: 'image/png',
},
{
src: 'icon/android/icon-48.png',
sizes: '48x48',
type: 'image/png',
},
{
src: 'icon/android/icon-72.png',
sizes: '72x72',
type: 'image/png',
},
{
src: 'icon/android/icon-96.png',
sizes: '96x96',
type: 'image/png',
},
{
src: 'icon/android/icon-144.png',
sizes: '144x144',
type: 'image/png',
},
{
src: 'icon/android/icon-192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'any maskable',
},
{
src: 'icon/android/icon-512.png',
sizes: '512x512',
type: 'image/png',
},
],
start_url: './index.html',
display: 'standalone',
theme_color: '#F5F7FB',
background_color: '#ffffff',
},
}),
],
resolve: {
alias: [
{
find: '@',
replacement: path.resolve(__dirname, 'src'),
},
],
},
server: {
port: 3000,
hmr: {
overlay: false,
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/test/setup.js',
},
});