Skip to content

Commit 1d78823

Browse files
committed
test: a simple SSR test (WIP)
The ssrContext part doesn't work quite right now. Because: 1. plugin-vue2 doesn't support ssrContext registration yet, so supporting it in JSX plugin isn't quite useful yet. 2. haven't figured out how to properly use async components here.
1 parent 9139b82 commit 1d78823

30 files changed

Lines changed: 1055 additions & 44 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"tsx": "^3.7.1",
4747
"unbuild": "^0.7.4",
4848
"vite": "^2.9.13",
49-
"vue": "^2.7.0"
49+
"vue": "^2.7.4"
5050
},
5151
"peerDependencies": {
5252
"vite": "^2.9.13",
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@vitejs/vue2-jsx-playground",
2+
"name": "@vitejs/vue2-jsx-playground-basic",
33
"version": "1.0.0",
44
"private": true,
55
"description": "",
@@ -9,10 +9,11 @@
99
"serve": "vite preview"
1010
},
1111
"dependencies": {
12-
"vue": "^2.7.0"
12+
"vue": "^2.7.4"
1313
},
1414
"devDependencies": {
1515
"@vitejs/plugin-vue2": "^1.1.2",
16+
"@vitejs/plugin-vue2-jsx": "workspace:*",
1617
"@vue/tsconfig": "^0.1.3",
1718
"vite": "^2.9.13"
1819
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": "@vue/tsconfig/tsconfig.web.json",
33
"include": [
44
"./",
5-
"../src",
65
],
76
"vueCompilerOptions": {
87
"target": 2.7
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineConfig } from 'vite'
22

33
import vue2 from '@vitejs/plugin-vue2'
4-
import vue2Jsx from '../src/index'
4+
import vue2Jsx from '@vitejs/plugin-vue2-jsx'
55

66
export default defineConfig({
77
resolve: {

playground/ssr/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Vite App</title>
7+
<!--preload-links-->
8+
</head>
9+
<body>
10+
<div id="app"><!--app-html--></div>
11+
<script type="module" src="/src/entry-client.js"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)