@wsxjs/wsx-vite-plugin 0.0.7 → 0.0.9
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/dist/index.d.mts +6 -26
- package/dist/index.d.ts +6 -26
- package/dist/index.js +585 -46
- package/dist/index.mjs +575 -46
- package/package.json +14 -6
- package/src/babel-plugin-wsx-focus.ts +219 -0
- package/src/babel-plugin-wsx-state.ts +394 -0
- package/src/babel-plugin-wsx-style.ts +149 -0
- package/src/index.ts +2 -1
- package/src/vite-plugin-wsx-babel.ts +182 -0
- package/src/vite-plugin-wsx.ts +0 -166
package/dist/index.d.mts
CHANGED
|
@@ -1,39 +1,19 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Vite Plugin for WSX
|
|
4
|
+
* Vite Plugin for WSX with Babel decorator support
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* - 支持TypeScript编译
|
|
9
|
-
* - 完全隔离,不影响主项目React配置
|
|
6
|
+
* Uses Babel to preprocess decorators before esbuild transformation
|
|
7
|
+
* This ensures decorators work correctly even with esbuild's limitations
|
|
10
8
|
*/
|
|
11
9
|
|
|
12
10
|
interface WSXPluginOptions {
|
|
13
|
-
/**
|
|
14
|
-
* JSX工厂函数名
|
|
15
|
-
* @default 'h'
|
|
16
|
-
*/
|
|
17
11
|
jsxFactory?: string;
|
|
18
|
-
/**
|
|
19
|
-
* JSX Fragment函数名
|
|
20
|
-
* @default 'Fragment'
|
|
21
|
-
*/
|
|
22
12
|
jsxFragment?: string;
|
|
23
|
-
/**
|
|
24
|
-
* 是否启用调试日志
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
13
|
debug?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* 文件扩展名
|
|
30
|
-
* @default ['.wsx']
|
|
31
|
-
*/
|
|
32
14
|
extensions?: string[];
|
|
15
|
+
autoStyleInjection?: boolean;
|
|
33
16
|
}
|
|
34
|
-
|
|
35
|
-
* WSX Vite插件
|
|
36
|
-
*/
|
|
37
|
-
declare function vitePluginWSX(options?: WSXPluginOptions): Plugin;
|
|
17
|
+
declare function vitePluginWSXWithBabel(options?: WSXPluginOptions): Plugin;
|
|
38
18
|
|
|
39
|
-
export {
|
|
19
|
+
export { vitePluginWSXWithBabel as wsx };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,39 +1,19 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Vite Plugin for WSX
|
|
4
|
+
* Vite Plugin for WSX with Babel decorator support
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* - 支持TypeScript编译
|
|
9
|
-
* - 完全隔离,不影响主项目React配置
|
|
6
|
+
* Uses Babel to preprocess decorators before esbuild transformation
|
|
7
|
+
* This ensures decorators work correctly even with esbuild's limitations
|
|
10
8
|
*/
|
|
11
9
|
|
|
12
10
|
interface WSXPluginOptions {
|
|
13
|
-
/**
|
|
14
|
-
* JSX工厂函数名
|
|
15
|
-
* @default 'h'
|
|
16
|
-
*/
|
|
17
11
|
jsxFactory?: string;
|
|
18
|
-
/**
|
|
19
|
-
* JSX Fragment函数名
|
|
20
|
-
* @default 'Fragment'
|
|
21
|
-
*/
|
|
22
12
|
jsxFragment?: string;
|
|
23
|
-
/**
|
|
24
|
-
* 是否启用调试日志
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
13
|
debug?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* 文件扩展名
|
|
30
|
-
* @default ['.wsx']
|
|
31
|
-
*/
|
|
32
14
|
extensions?: string[];
|
|
15
|
+
autoStyleInjection?: boolean;
|
|
33
16
|
}
|
|
34
|
-
|
|
35
|
-
* WSX Vite插件
|
|
36
|
-
*/
|
|
37
|
-
declare function vitePluginWSX(options?: WSXPluginOptions): Plugin;
|
|
17
|
+
declare function vitePluginWSXWithBabel(options?: WSXPluginOptions): Plugin;
|
|
38
18
|
|
|
39
|
-
export {
|
|
19
|
+
export { vitePluginWSXWithBabel as wsx };
|