1. 程式人生 > 實用技巧 >taro3.x: subPackages分包處理解決包測試過大問題

taro3.x: subPackages分包處理解決包測試過大問題

分包使用tabar,tabar定義的頁面不能分包:

pages: [
    'pages/index/index',
    'pages/user/login/phone/index',
    'pages/chat/index',
    'pages/search/index',
    'pages/user/index'
  ],
  subPackages: [
    {
      root: 'pages/newhouse/',
      pages: [
        'index/index',
        'list/index',
        'search/index',
        
'detail/index' ] } ],
tabBar: {
    color: 'rgba(68, 68, 68, 1)',
    selectedColor: 'rgba(68, 68, 68, 1)',
    backgroundColor: 'white',
    list: [
      {
        iconPath: './assets/icons/home.png',
        selectedIconPath: './assets/icons/home_hv.png',
        text: '首頁',
        pagePath: 
'pages/index/index' }, { iconPath: './assets/icons/chat.png', selectedIconPath: './assets/icons/chat_hv.png', text: '微聊', pagePath: 'pages/chat/index' }, { iconPath: './assets/icons/user.png', selectedIconPath: './assets/icons/user_hv.png', text:
'我的', pagePath: 'pages/user/index' } ] }