@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.
@@ -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,CA2FxD"}
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timber-js/app",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "description": "Vite-native React framework for Cloudflare Workers — correct HTTP semantics, real status codes, pages that work without JavaScript",
5
5
  "keywords": [
6
6
  "cloudflare-workers",
@@ -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
- generateBundle(_options, bundle) {
181
- if ((this as any).environment?.name !== 'client') return;
182
-
183
- for (const [fileName, chunk] of Object.entries(bundle)) {
184
- if (chunk.type !== 'chunk') continue;
185
- if (!chunk.name?.startsWith('rsc-entry')) continue;
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
  }