File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
packages/babel-plugin-jsx/src Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " vue-jsx-monorepo" ,
3
3
"private" : true ,
4
4
"packageManager" :
" [email protected] " ,
5
+ "type" : " module" ,
5
6
"scripts" : {
6
7
"build" : " pnpm run -r build" ,
7
8
"test" : " vitest" ,
Original file line number Diff line number Diff line change 1
1
import * as t from '@babel/types' ;
2
2
import type * as BabelCore from '@babel/core' ;
3
- import template from '@babel/template' ;
3
+ import _template from '@babel/template' ;
4
4
// @ts -expect-error
5
- import syntaxJsx from '@babel/plugin-syntax-jsx' ;
5
+ import _syntaxJsx from '@babel/plugin-syntax-jsx' ;
6
6
// @ts -expect-error
7
7
import { addNamed , addNamespace , isModule } from '@babel/helper-module-imports' ;
8
8
import { type NodePath } from '@babel/traverse' ;
@@ -31,9 +31,17 @@ const hasJSX = (parentPath: NodePath<t.Program>) => {
31
31
32
32
const JSX_ANNOTATION_REGEX = / \* ? \s * @ j s x \s + ( [ ^ \s ] + ) / ;
33
33
34
+ /* #__NO_SIDE_EFFECTS__ */
35
+ function interopDefault ( m : any ) {
36
+ return m . default || m ;
37
+ }
38
+
39
+ const syntaxJsx = /*#__PURE__*/ interopDefault ( _syntaxJsx ) ;
40
+ const template = /*#__PURE__*/ interopDefault ( _template ) ;
41
+
34
42
export default ( { types } : typeof BabelCore ) : BabelCore . PluginObj < State > => ( {
35
43
name : 'babel-plugin-jsx' ,
36
- inherits : syntaxJsx ,
44
+ inherits : /*#__PURE__*/ interopDefault ( syntaxJsx ) ,
37
45
visitor : {
38
46
...transformVueJSX ,
39
47
...sugarFragment ,
You can’t perform that action at this time.
0 commit comments