@vureact/compiler-core 1.8.0 → 1.8.3
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.en.md +147 -25
- package/README.md +147 -27
- package/lib/{chunk-6MTN25KZ.esm.js → chunk-QPW3RUZH.esm.js} +11 -20
- package/lib/{chunk-V7G7OQWK.js → chunk-R34TQK4X.js} +11 -20
- package/lib/cli.esm.js +15 -14
- package/lib/cli.js +20 -19
- package/lib/compiler-core.d.cts +0 -1
- package/lib/compiler-core.d.ts +0 -1
- package/lib/compiler-core.esm.js +2 -2
- package/lib/compiler-core.js +3 -3
- package/package.json +6 -5
package/README.en.md
CHANGED
|
@@ -1,36 +1,55 @@
|
|
|
1
1
|
# @vureact/compiler-core
|
|
2
2
|
|
|
3
|
-
**Write in Vue
|
|
3
|
+
**Write in Vue, generate maintainable React.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`@vureact/compiler-core` is the **CLI and core compiler package** of VuReact.
|
|
6
|
+
It compiles Vue 3 SFC, script, and style files into **pure React 18+ code**, making it suitable for progressive migration and for teams that want to keep Vue authoring conventions while targeting a React app.
|
|
7
|
+
|
|
8
|
+
It is a **compile-time solution**, not a runtime bridge.
|
|
6
9
|
|
|
7
|
-
[](https://vureact.top/en/)
|
|
8
10
|
[](https://www.npmjs.com/package/@vureact/compiler-core)
|
|
9
|
-
[](https://www.npmjs.com/package/@vureact/compiler-core)
|
|
10
11
|
[](https://nodejs.org/)
|
|
11
|
-
[](https://
|
|
12
|
-
[](https://vuejs.org/)
|
|
13
|
-
[](https://reactjs.org/)
|
|
12
|
+
[](https://github.com/vureact-js/core/blob/master/LICENSE)
|
|
14
13
|
|
|
15
14
|
English | [简体中文](./README.md)
|
|
16
15
|
|
|
17
|
-
##
|
|
16
|
+
## Who this package is for
|
|
17
|
+
|
|
18
|
+
- Teams progressively migrating a Vue 3 codebase to React
|
|
19
|
+
- Developers who want Vue-style authoring with React output
|
|
20
|
+
- Projects that need a config-driven `build/watch` compilation workflow
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
## Usage
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
### 1. Install
|
|
22
25
|
|
|
23
26
|
```bash
|
|
24
27
|
npm install -D @vureact/compiler-core
|
|
25
28
|
```
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
You can also use:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm add -D @vureact/compiler-core
|
|
34
|
+
yarn add -D @vureact/compiler-core
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Create a config file
|
|
38
|
+
|
|
39
|
+
Create `vureact.config.ts` in your project root:
|
|
28
40
|
|
|
29
|
-
|
|
41
|
+
```ts
|
|
42
|
+
import { defineConfig } from '@vureact/compiler-core';
|
|
30
43
|
|
|
31
|
-
|
|
44
|
+
export default defineConfig({
|
|
45
|
+
input: '', // input path: a single file or a directory
|
|
46
|
+
exclude: ['src/main.ts'], // exclude the Vue entry file
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
If you are fine with the default workspace and output directory, this is enough.
|
|
32
51
|
|
|
33
|
-
|
|
52
|
+
If you want to make the output settings explicit, you can write:
|
|
34
53
|
|
|
35
54
|
```ts
|
|
36
55
|
import { defineConfig } from '@vureact/compiler-core';
|
|
@@ -46,25 +65,128 @@ export default defineConfig({
|
|
|
46
65
|
});
|
|
47
66
|
```
|
|
48
67
|
|
|
49
|
-
|
|
68
|
+
If your project uses Vue Router, you will usually also add:
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
router: {
|
|
72
|
+
configFile: 'src/router/index.ts',
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 3. Start with a single-file pilot
|
|
77
|
+
|
|
78
|
+
If you want to validate the transformation first, start with one SFC:
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
export default defineConfig({
|
|
82
|
+
input: './src/your-component.vue',
|
|
83
|
+
exclude: ['src/main.ts'],
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
This is useful when you want to:
|
|
88
|
+
|
|
89
|
+
- validate the compilation conventions first
|
|
90
|
+
- inspect the generated output first
|
|
91
|
+
- run a small pilot before scaling to the whole codebase
|
|
92
|
+
|
|
93
|
+
### 4. Expand to the whole project
|
|
94
|
+
|
|
95
|
+
Once the single-file pilot works, point `input` to a directory:
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
export default defineConfig({
|
|
99
|
+
input: './src',
|
|
100
|
+
exclude: ['src/main.ts'],
|
|
101
|
+
});
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
This will recursively process Vue, script, and style files under that directory.
|
|
105
|
+
|
|
106
|
+
> Note: VuReact primarily targets modern Vue 3 codebases built around `<script setup>`.
|
|
107
|
+
> If your project uses Vue Router, also see the [router adaptation guide](https://vureact.top/en/guide/router-adaptation.html).
|
|
108
|
+
|
|
109
|
+
### 5. Run the compiler
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# one-time build
|
|
113
|
+
npx vureact build
|
|
114
|
+
|
|
115
|
+
# watch mode
|
|
116
|
+
npx vureact watch
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
If you prefer scripts, add them to `package.json`:
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"scripts": {
|
|
124
|
+
"vr:build": "vureact build",
|
|
125
|
+
"vr:watch": "vureact watch"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 6. Check the output
|
|
131
|
+
|
|
132
|
+
By default, VuReact generates:
|
|
133
|
+
|
|
134
|
+
- `.vureact/cache` for compilation cache
|
|
135
|
+
- `.vureact/react-app` for the React app output
|
|
136
|
+
- `.tsx` / `.css` files that mirror your source structure
|
|
137
|
+
|
|
138
|
+
The project layout typically looks like:
|
|
139
|
+
|
|
140
|
+
```txt
|
|
141
|
+
vue-project/
|
|
142
|
+
├── .vureact/
|
|
143
|
+
│ ├── cache/
|
|
144
|
+
│ ├── react-app/
|
|
145
|
+
│ │ ├── src/
|
|
146
|
+
│ │ ├── package.json
|
|
147
|
+
│ │ ├── vite.config.ts
|
|
148
|
+
├── src/
|
|
149
|
+
├── package.json
|
|
150
|
+
└── vureact.config.ts
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
You can then run the generated app directly:
|
|
50
154
|
|
|
51
155
|
```bash
|
|
52
|
-
|
|
53
|
-
|
|
156
|
+
cd .vureact/react-app
|
|
157
|
+
npm install
|
|
158
|
+
npm run dev
|
|
54
159
|
```
|
|
55
160
|
|
|
56
|
-
|
|
161
|
+
If you want a deeper explanation of the two modes, continue with:
|
|
162
|
+
|
|
163
|
+
- [Watch Mode](https://vureact.top/en/guide/watch-mode.html)
|
|
164
|
+
- [Incremental Compilation](https://vureact.top/en/guide/incremental-compilation.html)
|
|
57
165
|
|
|
58
|
-
|
|
59
|
-
- **[VuReact Router](https://router.vureact.top/en)**: Vue Router 4.x → React Router DOM 7.9+ conversion
|
|
166
|
+
## What this package is not
|
|
60
167
|
|
|
61
|
-
|
|
168
|
+
- It is not a Vue-in-React / React-in-Vue runtime bridge
|
|
169
|
+
- It is not a zero-convention codemod for arbitrary Vue code
|
|
170
|
+
- It works best in projects that follow VuReact compilation conventions
|
|
62
171
|
|
|
63
|
-
##
|
|
172
|
+
## Related packages
|
|
64
173
|
|
|
65
|
-
|
|
174
|
+
- [@vureact/runtime-core](https://runtime.vureact.top/en/) - React-side Vue runtime adaptation APIs
|
|
175
|
+
- [@vureact/router](https://router.vureact.top/en/) - Vue Router to React Router adaptation
|
|
66
176
|
|
|
67
|
-
##
|
|
177
|
+
## Documentation
|
|
178
|
+
|
|
179
|
+
- [Quick Start](https://vureact.top/en/guide/quick-start.html)
|
|
180
|
+
- [Key Configuration](https://vureact.top/en/guide/key-configuration.html)
|
|
181
|
+
- [Watch Mode](https://vureact.top/en/guide/watch-mode.html)
|
|
182
|
+
- [Incremental Compilation](https://vureact.top/en/guide/incremental-compilation.html)
|
|
183
|
+
- [Progressive Migration Guide](https://vureact.top/en/guide/progressive-migration.html)
|
|
184
|
+
- [Config API](https://vureact.top/en/api/config.html)
|
|
185
|
+
- [FAQ](https://vureact.top/en/guide/faq.html)
|
|
186
|
+
|
|
187
|
+
## Repository and license
|
|
68
188
|
|
|
69
189
|
- GitHub: <https://github.com/vureact-js/core>
|
|
70
|
-
-
|
|
190
|
+
- Docs: <https://vureact.top/en>
|
|
191
|
+
|
|
192
|
+
MIT License © 2025 Ruihong Zhong (Ryan John)
|
package/README.md
CHANGED
|
@@ -1,36 +1,54 @@
|
|
|
1
1
|
# @vureact/compiler-core
|
|
2
2
|
|
|
3
|
-
**写 Vue,生成可维护的 React
|
|
3
|
+
**写 Vue,生成可维护的 React。**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`@vureact/compiler-core` 是 VuReact 的 **CLI 与核心编译包**。
|
|
6
|
+
它用于将 Vue 3 的 SFC、脚本和样式文件编译为 **纯 React 18+ 代码**,适合渐进式迁移,以及“保持 Vue 心智模型、输出 React 工程”的场景。
|
|
7
|
+
|
|
8
|
+
它是 **编译时方案**,不是运行时桥接。
|
|
6
9
|
|
|
7
|
-
[](https://vureact.top/)
|
|
8
10
|
[](https://www.npmjs.com/package/@vureact/compiler-core)
|
|
9
|
-
[](https://www.npmjs.com/package/@vureact/compiler-core)
|
|
10
11
|
[](https://nodejs.org/)
|
|
11
|
-
[](https://
|
|
12
|
-
[](https://vuejs.org/)
|
|
13
|
-
[](https://reactjs.org/)
|
|
12
|
+
[](https://github.com/vureact-js/core/blob/master/LICENSE)
|
|
14
13
|
|
|
15
14
|
简体中文 | [English](./README.en.md)
|
|
16
15
|
|
|
17
|
-
##
|
|
16
|
+
## 这个包适合谁
|
|
17
|
+
|
|
18
|
+
- 正在把 Vue 3 项目渐进迁移到 React
|
|
19
|
+
- 想继续按 Vue 约定写代码,但产出 React 工程
|
|
20
|
+
- 需要基于配置文件执行 `build/watch` 编译流程
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
## 使用方式
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
### 1. 安装
|
|
22
25
|
|
|
23
26
|
```bash
|
|
24
27
|
npm install -D @vureact/compiler-core
|
|
25
28
|
```
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
也可以使用:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm add -D @vureact/compiler-core
|
|
34
|
+
yarn add -D @vureact/compiler-core
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. 创建配置文件
|
|
38
|
+
|
|
39
|
+
在项目根目录新建 `vureact.config.ts`:
|
|
28
40
|
|
|
29
|
-
|
|
41
|
+
```ts
|
|
42
|
+
import { defineConfig } from '@vureact/compiler-core';
|
|
30
43
|
|
|
31
|
-
|
|
44
|
+
export default defineConfig({
|
|
45
|
+
exclude: ['src/main.ts'], // 排除 Vue 入口文件
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
如果你只想用默认工作区和输出目录,这样就够了。
|
|
32
50
|
|
|
33
|
-
|
|
51
|
+
如果需要显式指定输出配置,可以写成:
|
|
34
52
|
|
|
35
53
|
```ts
|
|
36
54
|
import { defineConfig } from '@vureact/compiler-core';
|
|
@@ -46,26 +64,128 @@ export default defineConfig({
|
|
|
46
64
|
});
|
|
47
65
|
```
|
|
48
66
|
|
|
49
|
-
|
|
67
|
+
如果项目使用 Vue Router,通常还会补上:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
router: {
|
|
71
|
+
configFile: 'src/router/index.ts',
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 3. 先从单文件试点
|
|
76
|
+
|
|
77
|
+
如果你想先验证一个组件能否稳定转换,可以先只编译单个 SFC:
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
export default defineConfig({
|
|
81
|
+
input: './src/your-component.vue',
|
|
82
|
+
exclude: ['src/main.ts'],
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
这适合:
|
|
87
|
+
|
|
88
|
+
- 先验证编译约定
|
|
89
|
+
- 先看生成结果
|
|
90
|
+
- 先小范围试点,而不是直接全仓推进
|
|
91
|
+
|
|
92
|
+
### 4. 再扩展到整个项目
|
|
93
|
+
|
|
94
|
+
当单文件试点通过后,再把 `input` 指向目录:
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
export default defineConfig({
|
|
98
|
+
input: './src',
|
|
99
|
+
exclude: ['src/main.ts'],
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
这会递归处理目录下的 Vue / Script / Style 文件。
|
|
104
|
+
|
|
105
|
+
> 注意:VuReact 优先支持基于 `<script setup>` 的现代 Vue 3 写法。
|
|
106
|
+
> 如果你的项目使用 Vue Router,请同时查看 [路由适配指南](https://vureact.top/guide/router-adaptation.html)。
|
|
107
|
+
|
|
108
|
+
### 5. 执行编译
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# 一次性编译
|
|
112
|
+
npx vureact build
|
|
113
|
+
|
|
114
|
+
# 监听模式
|
|
115
|
+
npx vureact watch
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
如果你更喜欢脚本命令,也可以写进 `package.json`:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"scripts": {
|
|
123
|
+
"vr:build": "vureact build",
|
|
124
|
+
"vr:watch": "vureact watch"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 6. 查看输出结果
|
|
130
|
+
|
|
131
|
+
默认情况下,VuReact 会生成:
|
|
132
|
+
|
|
133
|
+
- `.vureact/cache`:编译缓存
|
|
134
|
+
- `.vureact/react-app`:React 工程产物
|
|
135
|
+
- 与源目录结构对应的 `.tsx` / `.css` 文件
|
|
136
|
+
|
|
137
|
+
目录大致如下:
|
|
138
|
+
|
|
139
|
+
```txt
|
|
140
|
+
vue-project/
|
|
141
|
+
├── .vureact/
|
|
142
|
+
│ ├── cache/
|
|
143
|
+
│ ├── react-app/
|
|
144
|
+
│ │ ├── src/
|
|
145
|
+
│ │ ├── package.json
|
|
146
|
+
│ │ ├── vite.config.ts
|
|
147
|
+
├── src/
|
|
148
|
+
├── package.json
|
|
149
|
+
└── vureact.config.ts
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
进入产物目录后可直接运行:
|
|
50
153
|
|
|
51
154
|
```bash
|
|
52
|
-
|
|
53
|
-
|
|
155
|
+
cd .vureact/react-app
|
|
156
|
+
npm install
|
|
157
|
+
npm run dev
|
|
54
158
|
```
|
|
55
159
|
|
|
56
|
-
|
|
160
|
+
如果你想更系统地了解 build/watch 的差异,可以继续阅读:
|
|
161
|
+
|
|
162
|
+
- [监听模式](https://vureact.top/guide/watch-mode.html)
|
|
163
|
+
- [增量编译](https://vureact.top/guide/incremental-compilation.html)
|
|
164
|
+
|
|
165
|
+
## 这个包不负责什么
|
|
166
|
+
|
|
167
|
+
- 它不是 Vue in React / React in Vue 的运行时桥接层
|
|
168
|
+
- 它不是对任意 Vue 代码都“零约定”生效的通用 codemod
|
|
169
|
+
- 它更适合遵循 VuReact 编译约定的工程化项目
|
|
170
|
+
|
|
171
|
+
## 相关包
|
|
57
172
|
|
|
58
|
-
-
|
|
59
|
-
-
|
|
173
|
+
- [@vureact/runtime-core](https://runtime.vureact.top/):React 版 Vue 运行时适配 API
|
|
174
|
+
- [@vureact/router](https://router.vureact.top/):Vue Router 到 React Router 的适配方案
|
|
60
175
|
|
|
61
|
-
|
|
176
|
+
## 文档入口
|
|
62
177
|
|
|
63
|
-
|
|
178
|
+
- [快速开始](https://vureact.top/guide/quick-start.html)
|
|
179
|
+
- [关键配置](https://vureact.top/guide/key-configuration.html)
|
|
180
|
+
- [监听模式](https://vureact.top/guide/watch-mode.html)
|
|
181
|
+
- [增量编译](https://vureact.top/guide/incremental-compilation.html)
|
|
182
|
+
- [渐进式迁移指南](https://vureact.top/guide/progressive-migration.html)
|
|
183
|
+
- [配置 API](https://vureact.top/api/config.html)
|
|
184
|
+
- [FAQ](https://vureact.top/guide/faq.html)
|
|
64
185
|
|
|
65
|
-
|
|
186
|
+
## 仓库与许可证
|
|
66
187
|
|
|
67
|
-
|
|
188
|
+
- GitHub: <https://github.com/vureact-js/core>
|
|
189
|
+
- 文档: <https://vureact.top>
|
|
68
190
|
|
|
69
|
-
|
|
70
|
-
- Gitee:<https://gitee.com/vureact-js/core>
|
|
71
|
-
- 文档:<https://vureact.top>
|
|
191
|
+
MIT License © 2025 Ruihong Zhong (Ryan John)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vureact/compiler-core v1.8.
|
|
2
|
+
* @vureact/compiler-core v1.8.3
|
|
3
3
|
* (c) 2025-present Ruihong Zhong (Ryan John)
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
@@ -1314,9 +1314,6 @@ function resolveComponentName(ctx) {
|
|
|
1314
1314
|
if (!name) {
|
|
1315
1315
|
const defaultName = basename(filename).split(".")[0] || `FC${genHashByXXH(filename)}`;
|
|
1316
1316
|
name = capitalize(camelCase(defaultName));
|
|
1317
|
-
logger.warn(`Unnamed component detected. Using file name: <${name}>`, {
|
|
1318
|
-
file: filename
|
|
1319
|
-
});
|
|
1320
1317
|
}
|
|
1321
1318
|
scriptData.declaredOptions.name = name;
|
|
1322
1319
|
return t13.identifier(name);
|
|
@@ -6612,9 +6609,9 @@ function transform(ast, ctx, options) {
|
|
|
6612
6609
|
}
|
|
6613
6610
|
|
|
6614
6611
|
// package.json
|
|
6615
|
-
var version = "1.8.
|
|
6612
|
+
var version = "1.8.3";
|
|
6616
6613
|
var bin = {
|
|
6617
|
-
vureact: "
|
|
6614
|
+
vureact: "bin/vureact.js"
|
|
6618
6615
|
};
|
|
6619
6616
|
|
|
6620
6617
|
// src/plugins/prettier.ts
|
|
@@ -7036,13 +7033,6 @@ var Helper = class {
|
|
|
7036
7033
|
}
|
|
7037
7034
|
logger.clear();
|
|
7038
7035
|
}
|
|
7039
|
-
printCompileInfo(file, duration) {
|
|
7040
|
-
this.print(
|
|
7041
|
-
kleur4.green("Compiled"),
|
|
7042
|
-
kleur4.dim(normalizePath(this.relativePath(file))),
|
|
7043
|
-
kleur4.gray(`(${duration})`)
|
|
7044
|
-
);
|
|
7045
|
-
}
|
|
7046
7036
|
print(...message) {
|
|
7047
7037
|
if (this.compilerOpts.watch) {
|
|
7048
7038
|
const time = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
@@ -7473,8 +7463,7 @@ var CacheManager = class {
|
|
|
7473
7463
|
for (const key of keys) {
|
|
7474
7464
|
const updates = this.pendingUpdates.get(key);
|
|
7475
7465
|
if (!updates?.length) continue;
|
|
7476
|
-
const
|
|
7477
|
-
const entries = (this.cachedData[key] || []).filter((c) => activeFiles.has(c.file));
|
|
7466
|
+
const entries = [...this.cachedData[key] || []];
|
|
7478
7467
|
updates.forEach(({ unit, meta }) => {
|
|
7479
7468
|
const idx = entries.findIndex((c) => c.file === unit.file);
|
|
7480
7469
|
if (idx > -1) {
|
|
@@ -7545,9 +7534,7 @@ var CacheManager = class {
|
|
|
7545
7534
|
}
|
|
7546
7535
|
}
|
|
7547
7536
|
}
|
|
7548
|
-
const
|
|
7549
|
-
let entries = (this.cachedData || this.getEmptyList())[key] || [];
|
|
7550
|
-
entries = entries.filter((c) => activeFiles.has(c.file));
|
|
7537
|
+
const entries = [...(this.cachedData || this.getEmptyList())[key] || []];
|
|
7551
7538
|
updates.forEach(({ unit, meta }) => {
|
|
7552
7539
|
const idx = entries.findIndex((c) => c.file === unit.file);
|
|
7553
7540
|
if (idx > -1) {
|
|
@@ -7820,6 +7807,9 @@ var FileProcessor = class {
|
|
|
7820
7807
|
}
|
|
7821
7808
|
}
|
|
7822
7809
|
await this.cacheManager.updateCacheIncrementally(processed, key);
|
|
7810
|
+
if (this.fileCompiler.getIsCache() && !existingCache) {
|
|
7811
|
+
await this.cacheManager.flushCache(key);
|
|
7812
|
+
}
|
|
7823
7813
|
}
|
|
7824
7814
|
return processed;
|
|
7825
7815
|
}
|
|
@@ -8080,6 +8070,7 @@ var PipelineManager = class {
|
|
|
8080
8070
|
*/
|
|
8081
8071
|
resetSkippedCount() {
|
|
8082
8072
|
this.skippedCount = 0;
|
|
8073
|
+
this.fileProcessor.resetSkippedCount();
|
|
8083
8074
|
}
|
|
8084
8075
|
};
|
|
8085
8076
|
|
|
@@ -8158,7 +8149,7 @@ var ViteBootstrapper = class {
|
|
|
8158
8149
|
newPkg.devDependencies = newDevDeps;
|
|
8159
8150
|
newPkg = output?.packageJson?.(newPkg) || newPkg;
|
|
8160
8151
|
await this.fileCompiler.writeFileWithDir(outputPkgPath, JSON.stringify(newPkg, null, 2));
|
|
8161
|
-
this.spinner.succeed("
|
|
8152
|
+
this.spinner.succeed("Vite React environment initialized");
|
|
8162
8153
|
return true;
|
|
8163
8154
|
}
|
|
8164
8155
|
/**
|
|
@@ -8294,7 +8285,7 @@ var FileCompiler = class extends BaseCompiler {
|
|
|
8294
8285
|
const { viteBootstrapper, fileProcessor, cacheManager, pipelineManager, assetManager } = this.manager;
|
|
8295
8286
|
let startTime = 0;
|
|
8296
8287
|
try {
|
|
8297
|
-
this.updateSpinner("Initializing
|
|
8288
|
+
this.updateSpinner("Initializing environment...");
|
|
8298
8289
|
await viteBootstrapper.bootstrapIfNeeded();
|
|
8299
8290
|
const cacheMap = await cacheManager.loadAllCache();
|
|
8300
8291
|
startTime = performance.now();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } function _optionalChainDelete(ops) { const result = _optionalChain(ops); return result == null ? true : result; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13;/**
|
|
2
|
-
* @vureact/compiler-core v1.8.
|
|
2
|
+
* @vureact/compiler-core v1.8.3
|
|
3
3
|
* (c) 2025-present Ruihong Zhong (Ryan John)
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
@@ -1314,9 +1314,6 @@ function resolveComponentName(ctx) {
|
|
|
1314
1314
|
if (!name) {
|
|
1315
1315
|
const defaultName = _path.basename.call(void 0, filename).split(".")[0] || `FC${genHashByXXH(filename)}`;
|
|
1316
1316
|
name = capitalize(camelCase(defaultName));
|
|
1317
|
-
logger.warn(`Unnamed component detected. Using file name: <${name}>`, {
|
|
1318
|
-
file: filename
|
|
1319
|
-
});
|
|
1320
1317
|
}
|
|
1321
1318
|
scriptData.declaredOptions.name = name;
|
|
1322
1319
|
return t13.identifier(name);
|
|
@@ -6612,9 +6609,9 @@ function transform(ast, ctx, options) {
|
|
|
6612
6609
|
}
|
|
6613
6610
|
|
|
6614
6611
|
// package.json
|
|
6615
|
-
var version = "1.8.
|
|
6612
|
+
var version = "1.8.3";
|
|
6616
6613
|
var bin = {
|
|
6617
|
-
vureact: "
|
|
6614
|
+
vureact: "bin/vureact.js"
|
|
6618
6615
|
};
|
|
6619
6616
|
|
|
6620
6617
|
// src/plugins/prettier.ts
|
|
@@ -7036,13 +7033,6 @@ var Helper = (_class5 = class {
|
|
|
7036
7033
|
}
|
|
7037
7034
|
logger.clear();
|
|
7038
7035
|
}
|
|
7039
|
-
printCompileInfo(file, duration) {
|
|
7040
|
-
this.print(
|
|
7041
|
-
_kleur2.default.green("Compiled"),
|
|
7042
|
-
_kleur2.default.dim(normalizePath(this.relativePath(file))),
|
|
7043
|
-
_kleur2.default.gray(`(${duration})`)
|
|
7044
|
-
);
|
|
7045
|
-
}
|
|
7046
7036
|
print(...message) {
|
|
7047
7037
|
if (this.compilerOpts.watch) {
|
|
7048
7038
|
const time = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
@@ -7473,8 +7463,7 @@ var CacheManager = (_class9 = class {
|
|
|
7473
7463
|
for (const key of keys) {
|
|
7474
7464
|
const updates = this.pendingUpdates.get(key);
|
|
7475
7465
|
if (!_optionalChain([updates, 'optionalAccess', _281 => _281.length])) continue;
|
|
7476
|
-
const
|
|
7477
|
-
const entries = (this.cachedData[key] || []).filter((c) => activeFiles.has(c.file));
|
|
7466
|
+
const entries = [...this.cachedData[key] || []];
|
|
7478
7467
|
updates.forEach(({ unit, meta }) => {
|
|
7479
7468
|
const idx = entries.findIndex((c) => c.file === unit.file);
|
|
7480
7469
|
if (idx > -1) {
|
|
@@ -7545,9 +7534,7 @@ var CacheManager = (_class9 = class {
|
|
|
7545
7534
|
}
|
|
7546
7535
|
}
|
|
7547
7536
|
}
|
|
7548
|
-
const
|
|
7549
|
-
let entries = (this.cachedData || this.getEmptyList())[key] || [];
|
|
7550
|
-
entries = entries.filter((c) => activeFiles.has(c.file));
|
|
7537
|
+
const entries = [...(this.cachedData || this.getEmptyList())[key] || []];
|
|
7551
7538
|
updates.forEach(({ unit, meta }) => {
|
|
7552
7539
|
const idx = entries.findIndex((c) => c.file === unit.file);
|
|
7553
7540
|
if (idx > -1) {
|
|
@@ -7820,6 +7807,9 @@ var FileProcessor = (_class10 = class {
|
|
|
7820
7807
|
}
|
|
7821
7808
|
}
|
|
7822
7809
|
await this.cacheManager.updateCacheIncrementally(processed, key);
|
|
7810
|
+
if (this.fileCompiler.getIsCache() && !existingCache) {
|
|
7811
|
+
await this.cacheManager.flushCache(key);
|
|
7812
|
+
}
|
|
7823
7813
|
}
|
|
7824
7814
|
return processed;
|
|
7825
7815
|
}
|
|
@@ -8080,6 +8070,7 @@ var PipelineManager = (_class11 = class {
|
|
|
8080
8070
|
*/
|
|
8081
8071
|
resetSkippedCount() {
|
|
8082
8072
|
this.skippedCount = 0;
|
|
8073
|
+
this.fileProcessor.resetSkippedCount();
|
|
8083
8074
|
}
|
|
8084
8075
|
}, _class11);
|
|
8085
8076
|
|
|
@@ -8158,7 +8149,7 @@ var ViteBootstrapper = (_class12 = class {
|
|
|
8158
8149
|
newPkg.devDependencies = newDevDeps;
|
|
8159
8150
|
newPkg = _optionalChain([output, 'optionalAccess', _304 => _304.packageJson, 'optionalCall', _305 => _305(newPkg)]) || newPkg;
|
|
8160
8151
|
await this.fileCompiler.writeFileWithDir(outputPkgPath, JSON.stringify(newPkg, null, 2));
|
|
8161
|
-
this.spinner.succeed("
|
|
8152
|
+
this.spinner.succeed("Vite React environment initialized");
|
|
8162
8153
|
return true;
|
|
8163
8154
|
}
|
|
8164
8155
|
/**
|
|
@@ -8294,7 +8285,7 @@ var FileCompiler = (_class13 = class extends BaseCompiler {
|
|
|
8294
8285
|
const { viteBootstrapper, fileProcessor, cacheManager, pipelineManager, assetManager } = this.manager;
|
|
8295
8286
|
let startTime = 0;
|
|
8296
8287
|
try {
|
|
8297
|
-
this.updateSpinner("Initializing
|
|
8288
|
+
this.updateSpinner("Initializing environment...");
|
|
8298
8289
|
await viteBootstrapper.bootstrapIfNeeded();
|
|
8299
8290
|
const cacheMap = await cacheManager.loadAllCache();
|
|
8300
8291
|
startTime = performance.now();
|
package/lib/cli.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @vureact/compiler-core v1.8.
|
|
3
|
+
* @vureact/compiler-core v1.8.3
|
|
4
4
|
* (c) 2025-present Ruihong Zhong (Ryan John)
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
getDirname,
|
|
14
14
|
normalizePath,
|
|
15
15
|
version
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QPW3RUZH.esm.js";
|
|
17
17
|
|
|
18
18
|
// src/cli/index.ts
|
|
19
19
|
import { cac } from "cac";
|
|
@@ -81,7 +81,6 @@ function setupWatcher(compiler, config) {
|
|
|
81
81
|
ignored: cmpHelper.getExcludes(),
|
|
82
82
|
persistent: true,
|
|
83
83
|
ignoreInitial: true
|
|
84
|
-
// 初始扫描已由 compiler.execute 完成
|
|
85
84
|
});
|
|
86
85
|
watcher.on("all", async (event, filePath) => {
|
|
87
86
|
switch (event) {
|
|
@@ -105,36 +104,38 @@ function setupWatcher(compiler, config) {
|
|
|
105
104
|
};
|
|
106
105
|
const onRecompile = async (event, filePath) => {
|
|
107
106
|
const ext = path2.extname(filePath);
|
|
107
|
+
const relativePath = normalizePath(cmpHelper.relativePath(filePath));
|
|
108
108
|
if (ext in processors) {
|
|
109
109
|
spinner.start("Recompiling...");
|
|
110
110
|
const startTime = performance.now();
|
|
111
111
|
const fn = processors[ext];
|
|
112
112
|
const unit = await fn(filePath);
|
|
113
113
|
cmpHelper.printCoreLogs();
|
|
114
|
-
cmpHelper.printCompileInfo(filePath, calcElapsedTime(startTime));
|
|
115
114
|
if (unit) {
|
|
115
|
+
cmpHelper.print(
|
|
116
|
+
kleur2.green("compiled"),
|
|
117
|
+
kleur2.dim(relativePath),
|
|
118
|
+
kleur2.gray(`(${calcElapsedTime(startTime)})`)
|
|
119
|
+
);
|
|
116
120
|
await config.onChange?.(event, unit);
|
|
121
|
+
} else {
|
|
122
|
+
cmpHelper.print(kleur2.gray("cached"), kleur2.dim(relativePath));
|
|
117
123
|
}
|
|
118
124
|
} else {
|
|
119
125
|
spinner.start("Updating assets...");
|
|
120
126
|
await compiler.processAsset(filePath);
|
|
121
|
-
cmpHelper.print(
|
|
122
|
-
kleur2.blue("Copied Asset"),
|
|
123
|
-
kleur2.dim(normalizePath(cmpHelper.relativePath(filePath)))
|
|
124
|
-
);
|
|
127
|
+
cmpHelper.print(kleur2.blue("Copied Asset"), kleur2.dim(relativePath));
|
|
125
128
|
}
|
|
126
129
|
spinner.stop();
|
|
127
130
|
};
|
|
128
131
|
const onRemoveFile = async (type, filePath) => {
|
|
129
132
|
const ext = path2.extname(filePath);
|
|
133
|
+
const relativePath = normalizePath(cmpHelper.relativePath(filePath));
|
|
130
134
|
const scriptExtRegex = /\.(js|ts)$/i;
|
|
131
135
|
const styleExtRegex = /\.(css|less|sass|scss)$/i;
|
|
132
|
-
const removeFile = async (
|
|
133
|
-
await compiler.removeOutputPath(filePath,
|
|
134
|
-
cmpHelper.print(
|
|
135
|
-
kleur2.yellow("Removed"),
|
|
136
|
-
kleur2.dim(normalizePath(cmpHelper.relativePath(filePath)))
|
|
137
|
-
);
|
|
136
|
+
const removeFile = async (cacheKey) => {
|
|
137
|
+
await compiler.removeOutputPath(filePath, cacheKey);
|
|
138
|
+
cmpHelper.print(kleur2.yellow("Removed"), kleur2.dim(relativePath));
|
|
138
139
|
};
|
|
139
140
|
if (type === "unlink") {
|
|
140
141
|
if (ext === ".vue") {
|
package/lib/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict"; function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
|
|
3
|
-
* @vureact/compiler-core v1.8.
|
|
3
|
+
* @vureact/compiler-core v1.8.3
|
|
4
4
|
* (c) 2025-present Ruihong Zhong (Ryan John)
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkR34TQK4Xjs = require('./chunk-R34TQK4X.js');
|
|
17
17
|
|
|
18
18
|
// src/cli/index.ts
|
|
19
19
|
var _cac = require('cac');
|
|
@@ -76,12 +76,11 @@ var _ora = require('ora'); var _ora2 = _interopRequireDefault(_ora);
|
|
|
76
76
|
|
|
77
77
|
function setupWatcher(compiler, config) {
|
|
78
78
|
const spinner = _ora2.default.call(void 0, );
|
|
79
|
-
const cmpHelper = new (0,
|
|
79
|
+
const cmpHelper = new (0, _chunkR34TQK4Xjs.Helper)(config);
|
|
80
80
|
const watcher = _chokidar2.default.watch(cmpHelper.getInputPath(), {
|
|
81
81
|
ignored: cmpHelper.getExcludes(),
|
|
82
82
|
persistent: true,
|
|
83
83
|
ignoreInitial: true
|
|
84
|
-
// 初始扫描已由 compiler.execute 完成
|
|
85
84
|
});
|
|
86
85
|
watcher.on("all", async (event, filePath) => {
|
|
87
86
|
switch (event) {
|
|
@@ -105,36 +104,38 @@ function setupWatcher(compiler, config) {
|
|
|
105
104
|
};
|
|
106
105
|
const onRecompile = async (event, filePath) => {
|
|
107
106
|
const ext = _path2.default.extname(filePath);
|
|
107
|
+
const relativePath = _chunkR34TQK4Xjs.normalizePath.call(void 0, cmpHelper.relativePath(filePath));
|
|
108
108
|
if (ext in processors) {
|
|
109
109
|
spinner.start("Recompiling...");
|
|
110
110
|
const startTime = performance.now();
|
|
111
111
|
const fn = processors[ext];
|
|
112
112
|
const unit = await fn(filePath);
|
|
113
113
|
cmpHelper.printCoreLogs();
|
|
114
|
-
cmpHelper.printCompileInfo(filePath, _chunkV7G7OQWKjs.calcElapsedTime.call(void 0, startTime));
|
|
115
114
|
if (unit) {
|
|
115
|
+
cmpHelper.print(
|
|
116
|
+
_kleur2.default.green("compiled"),
|
|
117
|
+
_kleur2.default.dim(relativePath),
|
|
118
|
+
_kleur2.default.gray(`(${_chunkR34TQK4Xjs.calcElapsedTime.call(void 0, startTime)})`)
|
|
119
|
+
);
|
|
116
120
|
await _optionalChain([config, 'access', _5 => _5.onChange, 'optionalCall', _6 => _6(event, unit)]);
|
|
121
|
+
} else {
|
|
122
|
+
cmpHelper.print(_kleur2.default.gray("cached"), _kleur2.default.dim(relativePath));
|
|
117
123
|
}
|
|
118
124
|
} else {
|
|
119
125
|
spinner.start("Updating assets...");
|
|
120
126
|
await compiler.processAsset(filePath);
|
|
121
|
-
cmpHelper.print(
|
|
122
|
-
_kleur2.default.blue("Copied Asset"),
|
|
123
|
-
_kleur2.default.dim(_chunkV7G7OQWKjs.normalizePath.call(void 0, cmpHelper.relativePath(filePath)))
|
|
124
|
-
);
|
|
127
|
+
cmpHelper.print(_kleur2.default.blue("Copied Asset"), _kleur2.default.dim(relativePath));
|
|
125
128
|
}
|
|
126
129
|
spinner.stop();
|
|
127
130
|
};
|
|
128
131
|
const onRemoveFile = async (type, filePath) => {
|
|
129
132
|
const ext = _path2.default.extname(filePath);
|
|
133
|
+
const relativePath = _chunkR34TQK4Xjs.normalizePath.call(void 0, cmpHelper.relativePath(filePath));
|
|
130
134
|
const scriptExtRegex = /\.(js|ts)$/i;
|
|
131
135
|
const styleExtRegex = /\.(css|less|sass|scss)$/i;
|
|
132
|
-
const removeFile = async (
|
|
133
|
-
await compiler.removeOutputPath(filePath,
|
|
134
|
-
cmpHelper.print(
|
|
135
|
-
_kleur2.default.yellow("Removed"),
|
|
136
|
-
_kleur2.default.dim(_chunkV7G7OQWKjs.normalizePath.call(void 0, cmpHelper.relativePath(filePath)))
|
|
137
|
-
);
|
|
136
|
+
const removeFile = async (cacheKey) => {
|
|
137
|
+
await compiler.removeOutputPath(filePath, cacheKey);
|
|
138
|
+
cmpHelper.print(_kleur2.default.yellow("Removed"), _kleur2.default.dim(relativePath));
|
|
138
139
|
};
|
|
139
140
|
if (type === "unlink") {
|
|
140
141
|
if (ext === ".vue") {
|
|
@@ -166,7 +167,7 @@ async function resolveAction(root, options) {
|
|
|
166
167
|
const projectRoot = root ? _path2.default.resolve(process.cwd(), root) : process.cwd();
|
|
167
168
|
const userConfig = await loadUserConfig(projectRoot);
|
|
168
169
|
const finalConfig = mergeConfig(projectRoot, options, userConfig);
|
|
169
|
-
const compiler = new (0,
|
|
170
|
+
const compiler = new (0, _chunkR34TQK4Xjs.VuReact)(finalConfig);
|
|
170
171
|
await compiler.execute();
|
|
171
172
|
if (finalConfig.watch) {
|
|
172
173
|
setupWatcher(compiler, finalConfig);
|
|
@@ -189,7 +190,7 @@ function resolveOptions(command) {
|
|
|
189
190
|
|
|
190
191
|
|
|
191
192
|
var _updatenotifier = require('update-notifier'); var _updatenotifier2 = _interopRequireDefault(_updatenotifier);
|
|
192
|
-
var __dirname =
|
|
193
|
+
var __dirname = _chunkR34TQK4Xjs.getDirname.call(void 0, import.meta.url);
|
|
193
194
|
function checkForUpdates() {
|
|
194
195
|
try {
|
|
195
196
|
const possiblePaths = [
|
|
@@ -230,7 +231,7 @@ function checkForUpdates() {
|
|
|
230
231
|
}
|
|
231
232
|
|
|
232
233
|
// src/cli/index.ts
|
|
233
|
-
var [programName] = Object.keys(
|
|
234
|
+
var [programName] = Object.keys(_chunkR34TQK4Xjs.bin);
|
|
234
235
|
var cli = _cac.cac.call(void 0, programName);
|
|
235
236
|
checkForUpdates();
|
|
236
237
|
var buildCommand = cli.command("build [root]", "Compile Vue3 to React (one-time)");
|
|
@@ -241,4 +242,4 @@ var watchCommand = cli.command("watch [root]", "Compile Vue3 to React and watch
|
|
|
241
242
|
resolveOptions(watchCommand).action((root, options) => {
|
|
242
243
|
resolveAction(root, { ...options, watch: true });
|
|
243
244
|
});
|
|
244
|
-
cli.help().version(
|
|
245
|
+
cli.help().version(_chunkR34TQK4Xjs.version).parse();
|
package/lib/compiler-core.d.cts
CHANGED
package/lib/compiler-core.d.ts
CHANGED
package/lib/compiler-core.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vureact/compiler-core v1.8.
|
|
2
|
+
* @vureact/compiler-core v1.8.3
|
|
3
3
|
* (c) 2025-present Ruihong Zhong (Ryan John)
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
parseOnlyScript,
|
|
19
19
|
parseSFC,
|
|
20
20
|
transform
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QPW3RUZH.esm.js";
|
|
22
22
|
export {
|
|
23
23
|
BaseCompiler,
|
|
24
24
|
CacheKey,
|
package/lib/compiler-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
|
2
|
-
* @vureact/compiler-core v1.8.
|
|
2
|
+
* @vureact/compiler-core v1.8.3
|
|
3
3
|
* (c) 2025-present Ruihong Zhong (Ryan John)
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkR34TQK4Xjs = require('./chunk-R34TQK4X.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -33,4 +33,4 @@ var _chunkV7G7OQWKjs = require('./chunk-V7G7OQWK.js');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
exports.BaseCompiler =
|
|
36
|
+
exports.BaseCompiler = _chunkR34TQK4Xjs.BaseCompiler; exports.CacheKey = _chunkR34TQK4Xjs.CacheKey; exports.FileCompiler = _chunkR34TQK4Xjs.FileCompiler; exports.Helper = _chunkR34TQK4Xjs.Helper; exports.VuReact = _chunkR34TQK4Xjs.VuReact; exports.defineConfig = _chunkR34TQK4Xjs.defineConfig; exports.generate = _chunkR34TQK4Xjs.generate; exports.generateComponent = _chunkR34TQK4Xjs.generateComponent; exports.generateOnlyScript = _chunkR34TQK4Xjs.generateOnlyScript; exports.parse = _chunkR34TQK4Xjs.parse; exports.parseOnlyScript = _chunkR34TQK4Xjs.parseOnlyScript; exports.parseSFC = _chunkR34TQK4Xjs.parseSFC; exports.transform = _chunkR34TQK4Xjs.transform;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vureact/compiler-core",
|
|
3
|
-
"version": "1.8.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.8.3",
|
|
4
|
+
"description": "🌀 Write in Vue 3, compile to React 18+.",
|
|
5
5
|
"author": "Ruihong Zhong (Ryan John)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"progressive-migration",
|
|
50
50
|
"automated-refactoring"
|
|
51
51
|
],
|
|
52
|
-
"homepage": "https://vureact
|
|
52
|
+
"homepage": "https://github.com/vureact-js/core#readme",
|
|
53
53
|
"repository": {
|
|
54
54
|
"type": "git",
|
|
55
55
|
"url": "git+https://github.com/vureact-js/core.git",
|
|
@@ -63,7 +63,8 @@
|
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build": "tsup",
|
|
66
|
-
"test": "tsx watch"
|
|
66
|
+
"test": "tsx watch",
|
|
67
|
+
"prepublishOnly": "npm run build"
|
|
67
68
|
},
|
|
68
69
|
"peerDependencies": {
|
|
69
70
|
"prettier": "^3.0.0"
|
|
@@ -98,4 +99,4 @@
|
|
|
98
99
|
"engines": {
|
|
99
100
|
"node": ">=19.0.0"
|
|
100
101
|
}
|
|
101
|
-
}
|
|
102
|
+
}
|