uni-app 发行小程序时 platforms目录中的其他平台代码(如app-plus)也会被打包进去

uni-app 发行小程序时 platforms目录中的其他平台代码(如app-plus)也会被打包进去

操作步骤:

  • 下载hello-uniapp项目,打包为微信小程序

预期结果:

  • unpackage/dist/build/mp-weixin/platforms/目录下没有app-plus目录

实际结果:

  • unpackage/dist/build/mp-weixin/platforms/目录下存在app-plus目录

bug描述:

hello-uniapp项目,platforms目录在发行为各种小程序时,其他平台的代码也会一并被打包,比如app-plus目录也会被打包进小程序发行包。同时终端提示信息是已经忽略了其他平台的页面。


更多关于uni-app 发行小程序时 platforms目录中的其他平台代码(如app-plus)也会被打包进去的实战教程也可以访问 https://www.itying.com/category-93-b0.html

3 回复

你好,已确认bug,感谢反馈,已加分

更多关于uni-app 发行小程序时 platforms目录中的其他平台代码(如app-plus)也会被打包进去的实战教程也可以访问 https://www.itying.com/category-93-b0.html


你好,临时解决方案是,在page.json 里面写条件编译,小程序环境下过滤掉platform 页面, 条件编译文档

回到顶部