-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
97 lines (89 loc) · 3.15 KB
/
Copy pathvite.config.js
File metadata and controls
97 lines (89 loc) · 3.15 KB
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
97
import { VitePWA } from 'vite-plugin-pwa';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: 'prompt',
injectRegister: false,
pwaAssets: {
disabled: false,
config: true,
},
manifest: {
name: 'green-map',
short_name: 'green-map',
description: '우리 지구 푸르게 푸르게',
theme_color: '#03c75a',
},
workbox: {
globPatterns: ['**/*.{js,css,html,svg,png,ico}'],
cleanupOutdatedCaches: true,
clientsClaim: true,
},
devOptions: {
enabled: false,
navigateFallback: 'index.html',
suppressWarnings: true,
type: 'module',
},
}),
],
});
// import { VitePWA } from 'vite-plugin-pwa';
// import { defineConfig } from 'vite';
// import react from '@vitejs/plugin-react';
// const REAL_API_TARGET = 'http://localhost:8080';
// export default defineConfig({
// plugins: [
// react(),
// VitePWA({
// registerType: 'prompt',
// injectRegister: false,
// pwaAssets: {
// disabled: false,
// config: true,
// },
// manifest: {
// name: 'green-map',
// short_name: 'green-map',
// description: '우리 지구 푸르게 푸르게',
// theme_color: '#03c75a',
// },
// workbox: {
// globPatterns: ['**/*.{js,css,html,svg,png,ico}'],
// cleanupOutdatedCaches: true,
// clientsClaim: true,
// skipWaiting: true,
// runtimeCaching: [{
// urlPattern: ({ url }) => url.pathname.startsWith('/news') ||
// url.pathname.startsWith('/point') ||
// url.pathname.startsWith('/verification') ||
// url.pathname.startsWith('/members'),
// handler: 'NetworkOnly',
// }],
// },
// devOptions: {
// enabled: false,
// navigateFallback: 'index.html',
// suppressWarnings: true,
// type: 'module',
// },
// }),
// ],
// server: {
// proxy: {
// '/news': { target: REAL_API_TARGET, changeOrigin: true, secure: false },
// '/point': { target: REAL_API_TARGET, changeOrigin: true, secure: false },
// '/verification': { target: REAL_API_TARGET, changeOrigin: true, secure: false },
// '/members': { target: REAL_API_TARGET, changeOrigin: true, secure: false },
// },
// hmr: {
// host: 'localhost',
// port: 5173,
// protocol: 'ws',
// },
// }
// });