Closed LC0117 closed 2 years ago
I'm not familiar with WeChat mini-program, but I guess this issue is caused by the import syntax of the lib, which might be incompatible with the compiler of WeChat mini-program. Modifying the value of field module
in tsconfig.json
from "esnext"
to "CommonJS"
and then re-generating the lib with yarn build
might help solve the problem.
I will test whether this modification maintains backward compatibility and consider making a new release recently.
Update: I've made a release using commonjs import syntax, and if you are still interested in integrating into miniApp, you can try thu-info-lib@1.3.5
or thu-info-lib@2.0.0-alpha.10
:)
Danke! I’ll try it out when I get free.
I am trying to develop a WeChat mini-program with some features like ThuInfo. However, I ran into some problems when I try to use this lib. The output is as follow.
And my code to import this lib:
I am wondering if the error is caused by my code or this lib.