Could not find component in path 'wxcomponents/vant weapp/dist/****/index'

WASubContext.js?t=wechat&s=1668912774528&v=2.27.1:1 Component is not found in path “wxcomponents/vant-weapp/dist/field/index” (using by “pages/Login/Login”)(env: Windows,mp,1.06.2210310; lib: 2.27.1)

When using uniapp to develop WeChat applets, the vant component will be used. When running in the WeChat developer tool, the above error will be reported, and the component import fails. At this time, it is found that the imported path is correct, and when compiling No error was reported, but the WeChat developer tool console reported an error

My solution is to modify the file 微信开发者工具inproject.config.jsonminifiedtrue


insert image description here

HBulider XModify and modify the following configuration in

insert image description here

Summary: minifiedWhether the uploaded code is automatically compressed or not, the reason why the components are not found is that the code is compressed. If you have a better solution, you can tell me in the comments, thank you all

Guess you like

Origin blog.csdn.net/weixin_65565362/article/details/127946980