@uni-helper/vite-plugin-uni-pages 0.3.8 → 0.3.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/client.d.ts +4 -2
- package/dist/index.cjs +12 -12
- package/dist/index.mjs +12 -12
- package/package.json +1 -1
package/client.d.ts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -497,21 +497,21 @@ async function tryPageMetaFromCustomBlock(sfc, routeBlockLang) {
|
|
|
497
497
|
return pageMeta;
|
|
498
498
|
}
|
|
499
499
|
function findMacro(stmts, filename) {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
throw new Error(`\u6BCF\u4E2A\u6587\u4EF6\u53EA\u5141\u8BB8\u8C03\u7528\u4E00\u6B21 definePage(): ${filename}`);
|
|
500
|
+
let macro;
|
|
501
|
+
for (const stmt of stmts) {
|
|
502
|
+
let node = stmt;
|
|
503
|
+
if (stmt.type === "ExpressionStatement")
|
|
504
|
+
node = stmt.expression;
|
|
505
|
+
if (astKit.isCallOf(node, "definePage")) {
|
|
506
|
+
macro = node;
|
|
507
|
+
break;
|
|
508
|
+
}
|
|
510
509
|
}
|
|
511
|
-
|
|
510
|
+
if (!macro)
|
|
511
|
+
return;
|
|
512
512
|
const [opt] = macro.arguments;
|
|
513
513
|
if (opt && !t__namespace.isFunctionExpression(opt) && !t__namespace.isArrowFunctionExpression(opt) && !t__namespace.isObjectExpression(opt)) {
|
|
514
|
-
debug.definePage(`definePage()
|
|
514
|
+
debug.definePage(`definePage() \u53C2\u6570\u4EC5\u652F\u6301\u51FD\u6570\u6216\u5BF9\u8C61: ${filename}`);
|
|
515
515
|
return;
|
|
516
516
|
}
|
|
517
517
|
return macro;
|
package/dist/index.mjs
CHANGED
|
@@ -463,21 +463,21 @@ async function tryPageMetaFromCustomBlock(sfc, routeBlockLang) {
|
|
|
463
463
|
return pageMeta;
|
|
464
464
|
}
|
|
465
465
|
function findMacro(stmts, filename) {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
throw new Error(`\u6BCF\u4E2A\u6587\u4EF6\u53EA\u5141\u8BB8\u8C03\u7528\u4E00\u6B21 definePage(): ${filename}`);
|
|
466
|
+
let macro;
|
|
467
|
+
for (const stmt of stmts) {
|
|
468
|
+
let node = stmt;
|
|
469
|
+
if (stmt.type === "ExpressionStatement")
|
|
470
|
+
node = stmt.expression;
|
|
471
|
+
if (isCallOf(node, "definePage")) {
|
|
472
|
+
macro = node;
|
|
473
|
+
break;
|
|
474
|
+
}
|
|
476
475
|
}
|
|
477
|
-
|
|
476
|
+
if (!macro)
|
|
477
|
+
return;
|
|
478
478
|
const [opt] = macro.arguments;
|
|
479
479
|
if (opt && !t.isFunctionExpression(opt) && !t.isArrowFunctionExpression(opt) && !t.isObjectExpression(opt)) {
|
|
480
|
-
debug.definePage(`definePage()
|
|
480
|
+
debug.definePage(`definePage() \u53C2\u6570\u4EC5\u652F\u6301\u51FD\u6570\u6216\u5BF9\u8C61: ${filename}`);
|
|
481
481
|
return;
|
|
482
482
|
}
|
|
483
483
|
return macro;
|