Problem Description
During the process of importing the SDK using the uniapp WeChat applet, you may encounter such a situation:
when using console.log() to print the name of the imported module, the actual output name is not the name you expected. This is because after uniapp is compiled and packaged, the code will be renamed to reduce file size and improve execution efficiency, including modifying variable names, method names, module names, etc.
uniapp vue2.x
Introduce external js (sdk) files through import, normaluniapp vue3.x
Introduce external js (sdk) files through import, and report undefined error
The version of uniapp vue2 is fine, but vue3 is not.
Solution
When using uniapp to introduce third-party libraries or modules