import{normalizeIdentifier}from'../../../utils'exportfunctiondefinePageCode(pagesJson:Record<string,any>){constimportPagesCode:string[]=[]constdefinePagesCode:string[]=[]pagesJson.pages.forEach((page:UniApp.UniRoute)=>{constpagePath=page.pathconstpageIdentifier=normalizeIdentifier(pagePath)importPagesCode.push(`import ${pageIdentifier} from './${pagePath}.vue?mpType=page'`)definePagesCode.push(`__definePage('${pagePath}',${pageIdentifier})`)})returnimportPagesCode.join('\n')+'\n'+definePagesCode.join('\n')}