File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
packages/babel-plugin-jsx Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,19 @@ import sugarFragment from './sugar-fragment';
1010export type State = {
1111 get : ( name : string ) => any ;
1212 set : ( name : string , value : any ) => any ;
13- opts : Opts ;
13+ opts : VueJSXPluginOptions ;
1414}
1515
16- export interface Opts {
16+ export interface VueJSXPluginOptions {
17+ /** transform `on: { click: xx }` to `onClick: xxx` */
1718 transformOn ?: boolean ;
19+ /** enable optimization or not. */
1820 optimize ?: boolean ;
21+ /** merge static and dynamic class / style attributes / onXXX handlers */
1922 mergeProps ?: boolean ;
23+ /** configuring custom elements */
2024 isCustomElement ?: ( tag : string ) => boolean ;
25+ /** enable object slots syntax */
2126 enableObjectSlots ?: boolean ;
2227}
2328
Original file line number Diff line number Diff line change 11import { transform } from '@babel/core' ;
2- import JSX , { Opts } from '../src' ;
2+ import JSX , { VueJSXPluginOptions } from '../src' ;
33
44interface Test {
55 name : string ;
66 from : string ;
77}
88
99const transpile = (
10- source : string , options : Opts = { } ,
10+ source : string , options : VueJSXPluginOptions = { } ,
1111) => new Promise ( ( resolve , reject ) => transform (
1212 source ,
1313 {
Original file line number Diff line number Diff line change 44 "rootDirs" : [" ./src" ],
55 "outDir" : " dist" ,
66 "downlevelIteration" : true ,
7- "types" : [" node" , " jest" ]
7+ "types" : [" node" , " jest" ],
8+ "declaration" : true
89 },
9- "include" : [
10- " src/**/*" ,
11- " global.d.ts"
12- ],
10+ "include" : [" src/**/*" , " global.d.ts" ],
1311 "exclude" : [" node_modules" ]
1412}
You can’t perform that action at this time.
0 commit comments