Commit 3564938 1 parent 5adc529 commit 3564938 Copy full SHA for 3564938
File tree 2 files changed +3
-0
lines changed
2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ export default class Page extends Creator {
218
218
modifyState = state
219
219
}
220
220
221
+ // @ts -ignore
221
222
traverse ( ast , {
222
223
ExportDefaultDeclaration ( path ) {
223
224
modifyPagesOrSubPackages ( {
@@ -235,6 +236,7 @@ export default class Page extends Creator {
235
236
break
236
237
case ConfigModificationState . Success :
237
238
{
239
+ // @ts -ignore
238
240
const newCode = generate ( ast , { retainLines : true } )
239
241
fs . writeFileSync ( appConfigPath , newCode . code )
240
242
console . log ( `${ chalk . green ( '✔ ' ) } ${ chalk . grey ( `新页面信息已在 ${ appConfigPath } 文件中自动补全` ) } ` )
Original file line number Diff line number Diff line change @@ -605,6 +605,7 @@ function readSFCPageConfig(configPath: string) {
605
605
const configSource = matches [ 0 ]
606
606
const ast = babel . parse ( configSource , { filename : '' } ) as babel . ParseResult
607
607
608
+ // @ts -ignore
608
609
babel . traverse ( ast . program , { CallExpression : callExprHandler } )
609
610
}
610
611
You can’t perform that action at this time.
0 commit comments