@meituan-nocode/vite-plugin-nocode-compiler 0.1.0-beta.2 → 0.1.0-beta.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.
@@ -41,6 +41,7 @@ const parser_1 = require("@babel/parser");
41
41
  const magic_string_1 = __importDefault(require("magic-string"));
42
42
  const path_1 = __importDefault(require("path"));
43
43
  const utils_1 = require("../utils/utils");
44
+ const estreeWalker = __importStar(require("estree-walker"));
44
45
  /**
45
46
  * JSX 编译器类
46
47
  * 负责处理 JSX 文件的编译逻辑
@@ -77,8 +78,7 @@ class JSXCompiler {
77
78
  let changedElementsCount = 0;
78
79
  let currentElement = null;
79
80
  let arrayContext = null;
80
- const { walk } = await Promise.resolve().then(() => __importStar(require('estree-walker')));
81
- walk(ast, {
81
+ estreeWalker.walk(ast, {
82
82
  enter: (node) => {
83
83
  // 检测数组的 map 调用
84
84
  if (node.type === 'CallExpression' && node.callee?.type === 'MemberExpression' && node.callee.property?.name === 'map') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meituan-nocode/vite-plugin-nocode-compiler",
3
- "version": "0.1.0-beta.2",
3
+ "version": "0.1.0-beta.3",
4
4
  "description": "nocode编译插件",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",