Skip to content

Commit 077cb87

Browse files
committed
chore(jsx): add jsx plugin
1 parent ffad1b2 commit 077cb87

File tree

5 files changed

+343
-6
lines changed

5 files changed

+343
-6
lines changed

devui/button/button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ export type IButtonSize = 'lg' | 'md' | 'sm' | 'xs';
77

88
import './button.scss';
99

10-
export const Button = defineComponent({
10+
export default defineComponent({
1111
props: {
1212
id: {
13-
13+
type: [String, Number]
1414
},
1515
type: {
1616
type: String as () => IButtonType,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@commitlint/cli": "^11.0.0",
1818
"@commitlint/config-conventional": "^11.0.0",
1919
"@vitejs/plugin-vue": "^1.0.4",
20+
"@vitejs/plugin-vue-jsx": "^1.1.0",
2021
"@vue/compiler-sfc": "^3.0.5",
2122
"@vuedx/typecheck": "^0.4.1",
2223
"@vuedx/typescript-plugin-vue": "^0.4.1",

src/app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<script lang="ts">
103103
import { defineComponent } from 'vue'
104104
import AppContent from './components/app-content.vue'
105-
import DevUIButton from '../devui/button/button.vue'
105+
import DevUIButton from '../devui/button/button'
106106
107107
export default defineComponent({
108108
name: 'App',

vite.config.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
import { defineConfig } from 'vite'
2-
import vue from '@vitejs/plugin-vue'
1+
import { defineConfig } from 'vite';
2+
import vue from '@vitejs/plugin-vue';
3+
import vueJsx from '@vitejs/plugin-vue-jsx';
34

45
export default defineConfig({
5-
plugins: [vue()]
6+
plugins: [
7+
vue(),
8+
vueJsx({})
9+
],
610
})

0 commit comments

Comments
 (0)