Skip to content

Commit cb747c6

Browse files
a145789a145789webfansplz
authored
feat: jsx support (#9)
* feat: use babel compile jsx * feat: use babel support jsx * feat: add discontinue logic Co-authored-by: a145789 <[email protected]> Co-authored-by: webfansplz <[email protected]>
1 parent a484596 commit cb747c6

File tree

5 files changed

+1897
-2653
lines changed

5 files changed

+1897
-2653
lines changed

example/vue3/src/Welcome.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { defineComponent } from "vue"
33
export default defineComponent({
44
name: "Welcome",
55
setup() {
6-
return () => <p style="color: #fcb80f;cursor: pointer;"> Welcome to here 🚀 .</p>
6+
const text = `Welcome to here 🚀 .`
7+
return () => <p style={{color: '#fcb80f',cursor: 'pointer'}}> {text} </p>
78
},
89
})

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,17 @@
4141
"vite": "^2.0.0"
4242
},
4343
"dependencies": {
44+
"@babel/core": "^7.17.8",
45+
"@babel/plugin-syntax-import-meta": "^7.10.4",
46+
"@babel/plugin-transform-typescript": "^7.16.8",
47+
"@vue/babel-plugin-jsx": "^1.1.1",
4448
"@vue/compiler-dom": "^3.2.31",
4549
"chalk": "4.1.2",
4650
"magic-string": "^0.26.1",
4751
"shell-quote": "^1.7.3"
4852
},
4953
"devDependencies": {
54+
"@types/babel__core": "^7.1.19",
5055
"@vue/compiler-sfc": "^3.2.31",
5156
"@webfansplz/eslint-config": "^0.1.0",
5257
"eslint": "^8.11.0",

0 commit comments

Comments
 (0)