@timber-js/app 0.1.27 → 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 +0 -20
- package/dist/index.js.map +1 -1
- package/dist/plugins/entries.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/plugins/entries.ts +6 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/plugins/entries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAInC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAqGhD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/plugins/entries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAInC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAqGhD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CA+DxD"}
|
package/package.json
CHANGED
package/src/plugins/entries.ts
CHANGED
|
@@ -177,39 +177,11 @@ export function timberEntries(ctx: PluginContext): Plugin {
|
|
|
177
177
|
* in the client output. This is confusing since those chunks contain client
|
|
178
178
|
* components, not server code. Renaming clarifies their purpose.
|
|
179
179
|
*/
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
const newFileName = fileName.replace('rsc-entry', 'rsc-client-entry');
|
|
188
|
-
// Extract just the basename for matching code references like "./rsc-entry-XYZ.js"
|
|
189
|
-
const oldBase = fileName.split('/').pop()!;
|
|
190
|
-
const newBase = newFileName.split('/').pop()!;
|
|
191
|
-
|
|
192
|
-
chunk.fileName = newFileName;
|
|
193
|
-
chunk.name = chunk.name.replace('rsc-entry', 'rsc-client-entry');
|
|
194
|
-
bundle[newFileName] = chunk;
|
|
195
|
-
delete bundle[fileName];
|
|
196
|
-
|
|
197
|
-
// Update import references in other chunks
|
|
198
|
-
for (const other of Object.values(bundle)) {
|
|
199
|
-
if (other.type !== 'chunk') continue;
|
|
200
|
-
if (other.code.includes(oldBase)) {
|
|
201
|
-
other.code = other.code.replaceAll(oldBase, newBase);
|
|
202
|
-
}
|
|
203
|
-
if (other.imports) {
|
|
204
|
-
other.imports = other.imports.map((i) => (i === fileName ? newFileName : i));
|
|
205
|
-
}
|
|
206
|
-
if (other.dynamicImports) {
|
|
207
|
-
other.dynamicImports = other.dynamicImports.map((i) =>
|
|
208
|
-
i === fileName ? newFileName : i
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
},
|
|
180
|
+
// Note: chunk renaming (rsc-entry → rsc-client-entry) was previously done
|
|
181
|
+
// in generateBundle by mutating the bundle object. Rolldown does not support
|
|
182
|
+
// bundle mutation in generateBundle — assignments are silently ignored, which
|
|
183
|
+
// causes the renamed file to never be emitted while code references are
|
|
184
|
+
// updated, breaking client hydration. The rename is purely cosmetic and has
|
|
185
|
+
// been removed. The chunks keep their original "rsc-entry" names.
|
|
214
186
|
};
|
|
215
187
|
}
|