@timber-js/app 0.2.0-alpha.74 → 0.2.0-alpha.75

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":"shims.d.ts","sourceRoot":"","sources":["../../src/plugins/shims.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAsE1D;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CA8OvD"}
1
+ {"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../../src/plugins/shims.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAsE1D;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CA+OvD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timber-js/app",
3
- "version": "0.2.0-alpha.74",
3
+ "version": "0.2.0-alpha.75",
4
4
  "description": "Vite-native React framework built for Servers and Serverless Platforms — correct HTTP semantics, real status codes, pages that work without JavaScript",
5
5
  "keywords": [
6
6
  "cloudflare-workers",
@@ -180,12 +180,13 @@ export function timberShims(_ctx: PluginContext): Plugin {
180
180
  if (cleanId === '#client-internal') {
181
181
  const envName = (this as unknown as { environment?: { name?: string } }).environment?.name;
182
182
  if (envName === 'client') {
183
- // In the client (browser) env, resolve to the bare package specifier
184
- // so the dep optimizer deduplicates shared state (state.ts) with
185
- // @timber-js/app/client. Resolving to an absolute src/ path bypasses
186
- // the optimizer and creates split module instances globalRouter
187
- // set in one copy reads as null from the other.
188
- return { id: '@timber-js/app/client/internal', external: false };
183
+ // In the client (browser) env, resolve to dist/ so the dep
184
+ // optimizer (dev) and rolldown (build) can both find it.
185
+ // Resolving to src/ bypasses the optimizer and creates split
186
+ // module instances globalRouter set in one copy reads as
187
+ // null from the other. dist/ is the published entrypoint and
188
+ // works in both dev (optimizer deduplicates) and prod build.
189
+ return resolve(PKG_ROOT, 'dist', 'client', 'internal.js');
189
190
  }
190
191
  // RSC/SSR: resolve to src/ for Vite transform correctness.
191
192
  return resolve(PKG_ROOT, 'src', 'client', 'internal.ts');
@@ -212,8 +213,8 @@ export function timberShims(_ctx: PluginContext): Plugin {
212
213
  if (cleanId === '@timber-js/app/client/internal') {
213
214
  const envName = (this as unknown as { environment?: { name?: string } }).environment?.name;
214
215
  if (envName === 'client') {
215
- // Let the dep optimizer handle it — same as #client-internal above.
216
- return null;
216
+ // Same as #client-internal above — resolve to dist/.
217
+ return resolve(PKG_ROOT, 'dist', 'client', 'internal.js');
217
218
  }
218
219
  return resolve(PKG_ROOT, 'src', 'client', 'internal.ts');
219
220
  }