This commit is contained in:
HongRun Liu
2026-05-26 15:52:30 +08:00
commit b0744c8ab6
849 changed files with 130587 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
// 目的:解决微信小程序的「代码质量」在「JS 文件」提示:主包内,不应该存在主包未使用的 JS 文件
const files = import.meta.glob('./*/*.js', { eager: true });
let api = {};
Object.keys(files).forEach((key) => {
api = {
...api,
[key.replace(/(.*\/)*([^.]+).*/gi, '$2')]: files[key].default,
};
});
export default api;