在执行 h5 预览后再执行微信小程序预览时 sitemap.json 文件缺失
taro init demo
cd demo
yarn & yarn dev:weapp # 此时有 sitemap.json,在微信开发者工具中预览正常
# 停止编译监听,执行:
yarn dev:h5
# 编译完 h5 后,再停止编译监听,执行:
yarn dev:weapp # 编译过后 dist 目录没有了 sitemap.json

Taro CLI 2.1.3 environment info:
System:
OS: macOS 10.15.4
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.14.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
CC @Chen-jj
欢迎提交 Issue~
如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏
如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。
Good luck and happy coding~
Most helpful comment
https://kycool.cn/2019/08/03/taroWeappSitemap/