We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
因为vite只支持esm规范,exports属于commonjs规范。 解决办法是,使用patch-package 或者pnpm、yarn自带的补丁工具,给包打补丁。 比如pnpm,打补丁后自动生成的内容如下
diff --git a/pontCore/pontCore.js b/pontCore/pontCore.js index 1e1bdfcaefedf5e37ac95014dbecd6953ad10dbb..9ebc94ff4b25a2ac83a54bf95806e50fde8bb1e1 100644 --- a/pontCore/pontCore.js +++ b/pontCore/pontCore.js @@ -13,7 +13,7 @@ var __assign = (this && this.__assign) || function () { }; return __assign.apply(this, arguments); }; -Object.defineProperty(exports, "__esModule", { value: true }); +// Object.defineProperty(exports, "__esModule", { value: true }); var PontCoreManager = /** @class */ (function () { function PontCoreManager() { } @@ -72,4 +72,4 @@ var PontCoreManager = /** @class */ (function () { PontCoreManager.singleInstance = null; return PontCoreManager; }()); -exports.PontCore = PontCoreManager.getSignleInstance(); +export const PontCore = PontCoreManager.getSignleInstance();
解决办法看我博客
将pont-config.json中的surrounding改为javaScript即可。 哪怕用ts,也不要写成typeScript
pont-config.json
The text was updated successfully, but these errors were encountered:
patch-package怎么解决
Sorry, something went wrong.
问题3已解决:#407
No branches or pull requests
问题1:vite不能识别pontCore.js中的exports
因为vite只支持esm规范,exports属于commonjs规范。
解决办法是,使用patch-package 或者pnpm、yarn自带的补丁工具,给包打补丁。
比如pnpm,打补丁后自动生成的内容如下
问题2:若后端的返回泛型,且泛型的类型是复杂类型,则生成的返回类型有误
解决办法看我博客
问题3:不生成pontCore.js
将
pont-config.json
中的surrounding改为javaScript即可。哪怕用ts,也不要写成typeScript
The text was updated successfully, but these errors were encountered: