Skip to content

Commit e5d652f

Browse files
authoredMar 2, 2021
chore(playground): upgrade vite (#5)
1 parent c5d87f8 commit e5d652f

File tree

4 files changed

+139
-997
lines changed

4 files changed

+139
-997
lines changed
 

‎playground/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@
1818
"@types/koa-json": "^2.0.18",
1919
"@types/koa__router": "^8.0.2",
2020
"@types/ws": "^7.2.6",
21+
"@vitejs/plugin-vue": "^1.1.5",
2122
"@vue/compiler-sfc": "^3.0.4",
2223
"chokidar": "^3.4.0",
2324
"concurrently": "^5.2.0",
2425
"fast-glob": "^3.2.4",
2526
"fs-extra": "^9.0.1",
27+
"koa": "^2.13.1",
2628
"koa-bodyparser": "^4.3.0",
2729
"koa-error": "^3.2.0",
2830
"koa-json": "^2.0.2",
2931
"ts-node": "^8.10.2",
3032
"ts-node-dev": "1.1.1",
31-
"vite": "^1.0.0-rc.13",
33+
"vite": "^2.0.4",
3234
"ws": "^7.3.0"
3335
}
3436
}

‎playground/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "..",
2+
"extends": "../tsconfig.json",
33
"exclude": [],
44
"compilerOptions": {
55
"lib": ["ES2020", "DOM"],

‎playground/vite.config.ts

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1+
import { defineConfig } from 'vite'
2+
import vue from '@vitejs/plugin-vue'
3+
14
const API_PORT = process.env.API_PORT || 3002
25

3-
export default {
4-
proxy: {
5-
'/api': {
6-
target: `http://localhost:${API_PORT}/`,
7-
changeOrigin: true,
8-
rewrite: (path: string) => path.replace(/^\/api/, '')
6+
export default defineConfig({
7+
server: {
8+
proxy: {
9+
'/api': {
10+
target: `http://localhost:${API_PORT}/`,
11+
changeOrigin: true,
12+
rewrite: (path: string) => path.replace(/^\/api/, '')
13+
}
914
}
10-
}
11-
}
15+
},
16+
plugins: [
17+
vue()
18+
]
19+
})

‎playground/yarn.lock

+119-987
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.