Tencent / wepy

小程序组件化开发框架
https://wepyjs.gitee.io/wepy-docs/
Other
22.51k stars 3.05k forks source link

打包上传到微信服务器 不是上传dist里面的所有文件么 #1639

Closed zhongbo320 closed 5 years ago

zhongbo320 commented 6 years ago

提交ISSUE前请确保已认真阅读以下内容

Please read the following information carefully before you open an issue.

在提交issue之前必须确认以下问题:

Please make sure you understand the following points:

阅读完后请在提交的issue中删除以上内容,包括分割线

DELETE THE INFORMATION ABOVE(INCLUDE THE SEPARATION LINE) BEFORE YOU OPEN AN ISSUE


Description

[问题描述:站在其它人的角度尽可能清晰地、简洁地把问题描述清楚]

[Description of the issue]

Environment

Reproduce

[如何重现问题]

[How to reproduce the issue]

Observed Results

[实际表现]

[Observed Results]

Expected Results

[期望表现]

[Expected Results]

Relevant Code / Logs


  // TODO(you): code or logs here to reproduce the problem
  // 可以使用小程序代码片段功能,方便其它人帮助你定位代码问题
  // 详情可参考这里:https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
  ```
我打包上传所有的dist文件  但是报index.template.html文件没有被打包上传 请大神指点一下
zhongbo320 commented 6 years ago

使用 wepy build --watch 打包的 然后上传到微信服务器 报错 index.template.html 为打包 不知道问题出在哪 请大神指教一下

chenyuwulu commented 6 years ago

wepy的机制就是这样,src下是我们写逻辑代码的地方,往里面拷入非js文件,wepy的解决方式都是复制一个到dist下。所以你看dist下是不是有html文件。另外,小程序只接受json,wxml,wxss,js这些文件,其他文件,都会忽略不压缩上传,所谓的报错,就是一个警告而已,要么一开始创建wepy项目的时候别去全部true,要么就自己手动删掉,不影响使用

qqjt commented 6 years ago

楼上说得对,将 src 下的 index.template.html 删掉,清空 dist 文件夹重新 wepy build 就可以了。

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. 因为这个 Issue 最近没有任何有效回复,所以被自动标记为了stale。 如果在未来7天依旧没有任何激活操作,那么该 Issue 将会被自动关闭。 感谢您的提问。