[WeChat Mini Program] [Failed to obtain files] The following files have been configured to ignore packaging and upload, and the simulator cannot obtain them: xxxx.js

During the development of the WeChat applet, I subcontracted the project and found that the subcontracted Js files could not be obtained and were incorrectly filtered.

Insert image description here

Solution

If you are developing directly using the WeChat applet developer tools, add two fields in the setting field in the project.config.json configuration file.

 "ignoreDevUnusedFiles": false, //关闭忽略隐藏未使用的文件
 "ignoreUploadUnusedFiles": false //忽略上传未使用的文件

Insert image description here
If you are developing using HBuilderX, add these two fields in the setting field in the project.config.json under the mp-weixin file under dev in dist in the unpackage directory. mp-weixin is generated when developing using HBuilderX. If the WeChat applet code is not modified here, then when HBuilderX recompiles the applet, the fields written in the WeChat developer tools will be lost. After adding these two fields and re-running, you will find that the warning disappears
Insert image description here
. Got it
Insert image description here

Guess you like

Origin blog.csdn.net/Daears/article/details/127263451