vue-jsx-vapor 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -0
- package/dist/rollup.d.ts +2 -2
- package/dist/unplugin.d.ts +2 -2
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# vue-jsx-vapor
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/vue-jsx-vapor)
|
|
4
|
+
|
|
5
|
+
Vapor Mode of Vue JSX.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- ⚡️ High Performance: It has the same performance as Vue Vapor!
|
|
10
|
+
- ⚒️ Directives: Support all build-in directives of Vue.
|
|
11
|
+
- ✨ Macros: Support most macros of Vue, Friendly to JSX.
|
|
12
|
+
- 🦀 Compiler rewritten in Rust: Based on Oxc, 20x performance improvement over Babel plugin.
|
|
13
|
+
- 🦾 Type Safe: Provide Volar plugin support by install TS Macro (VSCode plugin).
|
|
14
|
+
- ⚙️ ESLint: Provide an ESLint plugin for vue-jsx-vapor to automatically format code.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm i vue-jsx-vapor
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
- [📜 Documentation](https://jsx-vapor.netlify.app/)
|
|
25
|
+
- [🛰️ Playground](https://repl.zmjs.dev/vuejs/vue-jsx-vapor)
|
|
26
|
+
|
|
27
|
+
<details>
|
|
28
|
+
<summary>Vite</summary><br>
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
// vite.config.ts
|
|
32
|
+
import VueJsxVapor from 'vue-jsx-vapor/vite'
|
|
33
|
+
|
|
34
|
+
export default defineConfig({
|
|
35
|
+
plugins: [VueJsxVapor()],
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Example: [`playground/`](./playground/)
|
|
40
|
+
|
|
41
|
+
<br></details>
|
|
42
|
+
|
|
43
|
+
<details>
|
|
44
|
+
<summary>Rollup</summary><br>
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
// rollup.config.js
|
|
48
|
+
import VueJsxVapor from 'vue-jsx-vapor/rollup'
|
|
49
|
+
|
|
50
|
+
export default {
|
|
51
|
+
plugins: [VueJsxVapor()],
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
<br></details>
|
|
56
|
+
|
|
57
|
+
<details>
|
|
58
|
+
<summary>Webpack</summary><br>
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
// webpack.config.js
|
|
62
|
+
module.exports = {
|
|
63
|
+
/* ... */
|
|
64
|
+
plugins: [require('vue-jsx-vapor/webpack')()],
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
<br></details>
|
|
69
|
+
|
|
70
|
+
<details>
|
|
71
|
+
<summary>Nuxt</summary><br>
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
// nuxt.config.js
|
|
75
|
+
export default defineNuxtConfig({
|
|
76
|
+
modules: ['vue-jsx-vapor/nuxt'],
|
|
77
|
+
})
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
> This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)
|
|
81
|
+
|
|
82
|
+
<br></details>
|
|
83
|
+
|
|
84
|
+
<details>
|
|
85
|
+
<summary>Vue CLI</summary><br>
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
// vue.config.js
|
|
89
|
+
module.exports = {
|
|
90
|
+
configureWebpack: {
|
|
91
|
+
plugins: [require('vue-jsx-vapor/webpack')()],
|
|
92
|
+
},
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
<br></details>
|
|
97
|
+
|
|
98
|
+
<details>
|
|
99
|
+
<summary>esbuild</summary><br>
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
// esbuild.config.js
|
|
103
|
+
import { build } from 'esbuild'
|
|
104
|
+
import VueJsxVapor from 'vue-jsx-vapor/esbuild'
|
|
105
|
+
|
|
106
|
+
build({
|
|
107
|
+
plugins: [VueJsxVapor()],
|
|
108
|
+
})
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
<br></details>
|
package/dist/rollup.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Options } from "./options-D6zn5V49.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as unplugin1 from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/rollup.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => unplugin1.RollupPlugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/unplugin.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as Options } from "./options-D6zn5V49.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as unplugin2 from "unplugin";
|
|
3
3
|
import { UnpluginFactory } from "unplugin";
|
|
4
4
|
|
|
5
5
|
//#region src/unplugin.d.ts
|
|
6
6
|
declare const unpluginFactory: UnpluginFactory<Options | undefined, true>;
|
|
7
|
-
declare const unplugin:
|
|
7
|
+
declare const unplugin: unplugin2.UnpluginInstance<Options | undefined, true>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { type Options, unplugin as default, unplugin, unpluginFactory };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-jsx-vapor",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Vapor Mode of Vue JSX",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -172,9 +172,9 @@
|
|
|
172
172
|
"ts-macro": "^0.3.6",
|
|
173
173
|
"unplugin": "^2.3.10",
|
|
174
174
|
"unplugin-utils": "^0.2.5",
|
|
175
|
-
"@vue-jsx-vapor/
|
|
176
|
-
"@vue-jsx-vapor/
|
|
177
|
-
"@vue-jsx-vapor/runtime": "3.0.
|
|
175
|
+
"@vue-jsx-vapor/macros": "3.0.2",
|
|
176
|
+
"@vue-jsx-vapor/compiler-rs": "3.0.2",
|
|
177
|
+
"@vue-jsx-vapor/runtime": "3.0.2"
|
|
178
178
|
},
|
|
179
179
|
"devDependencies": {
|
|
180
180
|
"@nuxt/kit": "^3.19.2",
|