Skip to content

Commit c1e5691

Browse files
committed
🔨Setting: http -> https
1 parent e405228 commit c1e5691

File tree

1 file changed

+61
-64
lines changed

1 file changed

+61
-64
lines changed

vite.config.ts

Lines changed: 61 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,83 +2,80 @@ 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(() =>
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-
},
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+
})
3229
},
3330
},
3431
},
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,
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,
4846

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

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

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

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-
},
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'],
7976
},
8077
},
8178
},
82-
}
79+
},
8380
}
84-
)
81+
})

0 commit comments

Comments
 (0)