WeChat applet require error

I just got the project, and when I compiled it, I found that the modules and variables were not introduced successfully. After
insert image description here
reading the writing method of my colleague, I redefine require on app.js
insert image description here

solve

Check whether the WeChat developer tools are the latest version, please do not use the latest version, the official explanation:
insert image description here

Download historical versions of WeChat development tools: WeChat Developer Tools

Reference: WeChat open community: require introduces error reporting

Replenish

A big guy in the comment area gave a new solution!

insert image description here

I went to check these two configurations:
insert image description here
insert image description here
I still don’t read enough documents haha!

Guess you like

Origin blog.csdn.net/weixin_54858833/article/details/124764521