Skip to content

Commit fa4dec0

Browse files
authored
Merge pull request #111 from prgrms-web-devcourse-final-project/switch-from-https-to-http
🔨Setting: https -> http
2 parents 6327126 + 100262d commit fa4dec0

File tree

1 file changed

+64
-61
lines changed

1 file changed

+64
-61
lines changed

vite.config.ts

Lines changed: 64 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,80 +2,83 @@ import react from '@vitejs/plugin-react'
22
import { defineConfig } from 'vite'
33
import { compression } from 'vite-plugin-compression2'
44
import dts from 'vite-plugin-dts'
5-
import mkcert from 'vite-plugin-mkcert'
5+
// import mkcert from 'vite-plugin-mkcert'
66
import { VitePWA } from 'vite-plugin-pwa'
77
import svgr from 'vite-plugin-svgr'
88
import tsconfigPaths from 'vite-tsconfig-paths'
99

1010
// https://vitejs.dev/config/
11-
export default defineConfig(({ mode }) => {
12-
return {
13-
server: {
14-
port: 3000,
15-
strictPort: true,
16-
proxy: {
17-
'^/ors/v2/directions/.*': {
18-
target: 'http://112.162.84.70:8003',
19-
changeOrigin: true,
20-
secure: false,
21-
rewrite: path => path,
22-
configure: (proxy, options) => {
23-
proxy.on('error', (err, req, res) => {
24-
console.log('프록시 에러:', err)
25-
})
26-
proxy.on('proxyReq', (proxyReq, req, res) => {
27-
console.log('프록시 요청:', proxyReq.path)
28-
})
11+
export default defineConfig(() =>
12+
// { mode }
13+
{
14+
return {
15+
server: {
16+
port: 3000,
17+
strictPort: true,
18+
proxy: {
19+
'^/ors/v2/directions/.*': {
20+
target: 'http://112.162.84.70:8003',
21+
changeOrigin: true,
22+
secure: false,
23+
rewrite: path => path,
24+
configure: (proxy, options) => {
25+
proxy.on('error', (err, req, res) => {
26+
console.log('프록시 에러:', err)
27+
})
28+
proxy.on('proxyReq', (proxyReq, req, res) => {
29+
console.log('프록시 요청:', proxyReq.path)
30+
})
31+
},
2932
},
3033
},
3134
},
32-
},
33-
plugins: [
34-
react(),
35-
tsconfigPaths(),
36-
...(mode === 'development' ? [mkcert()] : []),
37-
svgr(),
38-
dts(),
39-
compression(),
40-
VitePWA({
41-
strategies: 'injectManifest',
42-
srcDir: 'src',
43-
filename: 'sw.ts',
44-
registerType: 'prompt',
45-
injectRegister: false,
35+
plugins: [
36+
react(),
37+
tsconfigPaths(),
38+
// ...(mode === 'development' ? [mkcert()] : []),
39+
svgr(),
40+
dts(),
41+
compression(),
42+
VitePWA({
43+
strategies: 'injectManifest',
44+
srcDir: 'src',
45+
filename: 'sw.ts',
46+
registerType: 'prompt',
47+
injectRegister: false,
4648

47-
pwaAssets: {
48-
disabled: false,
49-
config: true,
50-
},
49+
pwaAssets: {
50+
disabled: false,
51+
config: true,
52+
},
5153

52-
manifest: {
53-
name: 'DDang',
54-
short_name: 'DDang',
55-
description: '반려견 산책 서비스',
56-
theme_color: '#ffffff',
57-
},
54+
manifest: {
55+
name: 'DDang',
56+
short_name: 'DDang',
57+
description: '반려견 산책 서비스',
58+
theme_color: '#ffffff',
59+
},
5860

59-
injectManifest: {
60-
globPatterns: ['**/*.{js,css,html,svg,png,ico}'],
61-
},
61+
injectManifest: {
62+
globPatterns: ['**/*.{js,css,html,svg,png,ico}'],
63+
},
6264

63-
devOptions: {
64-
enabled: true,
65-
navigateFallback: 'index.html',
66-
suppressWarnings: true,
67-
type: 'module',
68-
},
69-
}),
70-
],
71-
build: {
72-
rollupOptions: {
73-
output: {
74-
manualChunks: {
75-
vendor: ['react', 'react-dom'],
65+
devOptions: {
66+
enabled: true,
67+
navigateFallback: 'index.html',
68+
suppressWarnings: true,
69+
type: 'module',
70+
},
71+
}),
72+
],
73+
build: {
74+
rollupOptions: {
75+
output: {
76+
manualChunks: {
77+
vendor: ['react', 'react-dom'],
78+
},
7679
},
7780
},
7881
},
79-
},
82+
}
8083
}
81-
})
84+
)

0 commit comments

Comments
 (0)