@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.
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/plugins/shims.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/plugins/shims.ts +9 -8
|
@@ -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,
|
|
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.
|
|
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",
|
package/src/plugins/shims.ts
CHANGED
|
@@ -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
|
|
184
|
-
//
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
//
|
|
188
|
-
|
|
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
|
-
//
|
|
216
|
-
return
|
|
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
|
}
|