megalojs / megalo-cli-service

:hammer_and_wrench: megalo的开箱即用webpack小程序脚手架配置,内置megalo生态的部分插件,并提供用户自定义配置的入口
MIT License
4 stars 0 forks source link

index.js tabBar 里面的图片配置路径无效 #5

Closed chang0022 closed 5 years ago

chang0022 commented 5 years ago
tabBar: {
  color: '#333',
  selectedColor: '#007d37',
  list: [
    {
      pagePath: 'pages/hello',
      text: 'home',
      iconPath: 'static/imgs/home.png',
      selectedIconPath: 'static/imgs/home_on.png'
    },
    {
      pagePath: 'pages/my/index',
      text: 'my',
      iconPath: 'static/imgs/mine.png',
      selectedIconPath: 'static/imgs/mine_on.png'
    }
  ]
},

iconPathselectedIconPath 图片引用无效。导致报错 image

项目是通过 @megalo/cli 初始化的项目。 原 build/createBaseConfig.js 有对此处理

new CopyWebpackPlugin([{
  from: 'src/static', to: 'static'
}])