提交 all-in-one H5 本地适配

This commit is contained in:
Chopper711
2026-06-10 22:19:17 +08:00
parent ab77ab7c2e
commit f0939430c9
12 changed files with 20554 additions and 51 deletions

View File

@@ -241,10 +241,7 @@
uuid._whatwgRNG = _whatwgRNG;
if (('undefined' !== typeof module) && module.exports) {
// Publish as node.js module
module.exports = uuid;
} else if (typeof define === 'function' && define.amd) {
if (typeof define === 'function' && define.amd) {
// Publish as AMD module
define(function() { return uuid; });
} else {
@@ -259,4 +256,7 @@
_window.uuid = uuid;
}
})('undefined' !== typeof window ? window : null);
})('undefined' !== typeof window ? window : ('undefined' !== typeof globalThis ? globalThis : {}));
// uni-app H5 的 webpack 包装会把 CommonJS exports 标记为只读,避免使用 module.exports 重新赋值。
export default ('undefined' !== typeof globalThis ? globalThis.uuid : undefined);