@timber-js/app 0.1.26 → 0.1.28
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.
package/dist/index.js
CHANGED
|
@@ -11844,26 +11844,6 @@ function timberEntries(ctx) {
|
|
|
11844
11844
|
load(id) {
|
|
11845
11845
|
if (id === RESOLVED_CONFIG_ID) return generateConfigModule(ctx);
|
|
11846
11846
|
return null;
|
|
11847
|
-
},
|
|
11848
|
-
generateBundle(_options, bundle) {
|
|
11849
|
-
if (this.environment?.name !== "client") return;
|
|
11850
|
-
for (const [fileName, chunk] of Object.entries(bundle)) {
|
|
11851
|
-
if (chunk.type !== "chunk") continue;
|
|
11852
|
-
if (!chunk.name?.startsWith("rsc-entry")) continue;
|
|
11853
|
-
const newFileName = fileName.replace("rsc-entry", "rsc-client-entry");
|
|
11854
|
-
const oldBase = fileName.split("/").pop();
|
|
11855
|
-
const newBase = newFileName.split("/").pop();
|
|
11856
|
-
chunk.fileName = newFileName;
|
|
11857
|
-
chunk.name = chunk.name.replace("rsc-entry", "rsc-client-entry");
|
|
11858
|
-
bundle[newFileName] = chunk;
|
|
11859
|
-
delete bundle[fileName];
|
|
11860
|
-
for (const other of Object.values(bundle)) {
|
|
11861
|
-
if (other.type !== "chunk") continue;
|
|
11862
|
-
if (other.code.includes(oldBase)) other.code = other.code.replaceAll(oldBase, newBase);
|
|
11863
|
-
if (other.imports) other.imports = other.imports.map((i) => i === fileName ? newFileName : i);
|
|
11864
|
-
if (other.dynamicImports) other.dynamicImports = other.dynamicImports.map((i) => i === fileName ? newFileName : i);
|
|
11865
|
-
}
|
|
11866
|
-
}
|
|
11867
11847
|
}
|
|
11868
11848
|
};
|
|
11869
11849
|
}
|
|
@@ -14159,8 +14139,15 @@ function timberServerBundle() {
|
|
|
14159
14139
|
renderChunk(code) {
|
|
14160
14140
|
const lazy = "var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);";
|
|
14161
14141
|
if (!code.includes(lazy)) return null;
|
|
14142
|
+
const eager = [
|
|
14143
|
+
"var __esmMin = (fn, res) => {",
|
|
14144
|
+
" var l = () => { if (fn) { var f = fn; try { res = f(); fn = 0; } catch(e) {} } return res; };",
|
|
14145
|
+
" l();",
|
|
14146
|
+
" return l;",
|
|
14147
|
+
"};"
|
|
14148
|
+
].join(" ");
|
|
14162
14149
|
return {
|
|
14163
|
-
code: code.replace(lazy,
|
|
14150
|
+
code: code.replace(lazy, eager),
|
|
14164
14151
|
map: null
|
|
14165
14152
|
};
|
|
14166
14153
|
}
|