@blocklet/pages-kit 0.4.16-beta.20250309-3 → 0.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -109,7 +109,10 @@ export function injectGlobalComponents() {
|
|
|
109
109
|
let hash = 0;
|
|
110
110
|
for (let i = 0; i < str.length; i++) {
|
|
111
111
|
const char = str.charCodeAt(i);
|
|
112
|
-
|
|
112
|
+
// eslint-disable-next-line no-bitwise
|
|
113
|
+
hash = (hash << 5) - hash + char;
|
|
114
|
+
// eslint-disable-next-line no-bitwise
|
|
115
|
+
hash &= hash;
|
|
113
116
|
}
|
|
114
117
|
return hash.toString(16);
|
|
115
118
|
};
|
|
@@ -122,8 +125,6 @@ export function injectGlobalComponents() {
|
|
|
122
125
|
if (cachedData) {
|
|
123
126
|
const { hash, imports } = JSON.parse(cachedData);
|
|
124
127
|
if (hash === moduleHash) {
|
|
125
|
-
// eslint-disable-next-line no-console
|
|
126
|
-
console.log(`getImportsFromCache: ${hash}`, imports);
|
|
127
128
|
return imports; // 返回缓存的 imports
|
|
128
129
|
}
|
|
129
130
|
}
|