2
2
3
3
[ ![ NPM version] ( https://img.shields.io/npm/v/unplugin-vue-jsx-vapor?color=a1b858&label= )] ( https://www.npmjs.com/package/unplugin-vue-jsx-vapor )
4
4
5
- Starter template for [ unplugin] ( https://github.com/unjs/unplugin ) .
6
-
7
- ## Template Usage
8
-
9
- To use this template, clone it down using:
10
-
11
- ``` bash
12
- npx degit unplugin/unplugin-vue-jsx-vapor my-unplugin
13
- ```
14
-
15
- And do a global replacement of ` unplugin-vue-jsx-vapor ` with your plugin name.
16
-
17
- Then you can start developing your unplugin 🔥
18
-
19
- To test your plugin, run: ` pnpm run dev `
20
- To release a new version, run: ` pnpm run release `
5
+ Convert JSX to Template for compiler-vapor.
21
6
22
7
## Install
23
8
@@ -30,11 +15,13 @@ npm i unplugin-vue-jsx-vapor
30
15
31
16
``` ts
32
17
// vite.config.ts
33
- import Starter from ' unplugin-vue-jsx-vapor/vite'
18
+ import VueJsxVapor from ' unplugin-vue-jsx-vapor/vite'
34
19
35
20
export default defineConfig ({
36
21
plugins: [
37
- Starter ({ /* options */ }),
22
+ VueJsxVapor ({
23
+ /* options */
24
+ }),
38
25
],
39
26
})
40
27
```
@@ -48,18 +35,19 @@ Example: [`playground/`](./playground/)
48
35
49
36
``` ts
50
37
// rollup.config.js
51
- import Starter from ' unplugin-vue-jsx-vapor/rollup'
38
+ import VueJsxVapor from ' unplugin-vue-jsx-vapor/rollup'
52
39
53
40
export default {
54
41
plugins: [
55
- Starter ({ /* options */ }),
42
+ VueJsxVapor ({
43
+ /* options */
44
+ }),
56
45
],
57
46
}
58
47
```
59
48
60
49
<br ></details >
61
50
62
-
63
51
<details >
64
52
<summary >Webpack</summary ><br >
65
53
@@ -68,8 +56,10 @@ export default {
68
56
module .exports = {
69
57
/* ... */
70
58
plugins: [
71
- require (' unplugin-vue-jsx-vapor/webpack' )({ /* options */ })
72
- ]
59
+ require (' unplugin-vue-jsx-vapor/webpack' )({
60
+ /* options */
61
+ }),
62
+ ],
73
63
}
74
64
```
75
65
@@ -82,7 +72,12 @@ module.exports = {
82
72
// nuxt.config.js
83
73
export default defineNuxtConfig ({
84
74
modules: [
85
- [' unplugin-vue-jsx-vapor/nuxt' , { /* options */ }],
75
+ [
76
+ ' unplugin-vue-jsx-vapor/nuxt' ,
77
+ {
78
+ /* options */
79
+ },
80
+ ],
86
81
],
87
82
})
88
83
```
@@ -99,7 +94,9 @@ export default defineNuxtConfig({
99
94
module .exports = {
100
95
configureWebpack: {
101
96
plugins: [
102
- require (' unplugin-vue-jsx-vapor/webpack' )({ /* options */ }),
97
+ require (' unplugin-vue-jsx-vapor/webpack' )({
98
+ /* options */
99
+ }),
103
100
],
104
101
},
105
102
}
@@ -113,10 +110,10 @@ module.exports = {
113
110
``` ts
114
111
// esbuild.config.js
115
112
import { build } from ' esbuild'
116
- import Starter from ' unplugin-vue-jsx-vapor/esbuild'
113
+ import VueJsxVapor from ' unplugin-vue-jsx-vapor/esbuild'
117
114
118
115
build ({
119
- plugins: [Starter ()],
116
+ plugins: [VueJsxVapor ()],
120
117
})
121
118
```
122
119
0 commit comments