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 22 "name" : " vue-jsx-monorepo" ,
33 "private" : true ,
44 "packageManager" : " pnpm@8.14.1" ,
5+ "type" : " module" ,
56 "scripts" : {
67 "build" : " pnpm run -r build" ,
78 "test" : " vitest" ,
Original file line number Diff line number Diff line change 11import * as t from '@babel/types' ;
22import type * as BabelCore from '@babel/core' ;
3- import template from '@babel/template' ;
3+ import _template from '@babel/template' ;
44// @ts -expect-error
5- import syntaxJsx from '@babel/plugin-syntax-jsx' ;
5+ import _syntaxJsx from '@babel/plugin-syntax-jsx' ;
66// @ts -expect-error
77import { addNamed , addNamespace , isModule } from '@babel/helper-module-imports' ;
88import { type NodePath } from '@babel/traverse' ;
@@ -31,9 +31,17 @@ const hasJSX = (parentPath: NodePath<t.Program>) => {
3131
3232const JSX_ANNOTATION_REGEX = / \* ? \s * @ j s x \s + ( [ ^ \s ] + ) / ;
3333
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+
3442export default ( { types } : typeof BabelCore ) : BabelCore . PluginObj < State > => ( {
3543 name : 'babel-plugin-jsx' ,
36- inherits : syntaxJsx ,
44+ inherits : /*#__PURE__*/ interopDefault ( syntaxJsx ) ,
3745 visitor : {
3846 ...transformVueJSX ,
3947 ...sugarFragment ,
You can’t perform that action at this time.
0 commit comments