@timber-js/app 0.1.41 → 0.1.42
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 +6 -2
- package/dist/index.js.map +1 -1
- package/dist/plugins/chunks.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/plugins/chunks.ts +7 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks.d.ts","sourceRoot":"","sources":["../../src/plugins/chunks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"chunks.d.ts","sourceRoot":"","sources":["../../src/plugins/chunks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAwGnC;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA4B1D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,GAAG,SAAS,CAcrB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAoBrC"}
|
package/package.json
CHANGED
package/src/plugins/chunks.ts
CHANGED
|
@@ -97,10 +97,15 @@ function isReactVendor(id: string): boolean {
|
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* Check if a module is part of the timber framework runtime (tier 2).
|
|
100
|
+
*
|
|
101
|
+
* Matches both monorepo paths (packages/timber-app/...) and consumer
|
|
102
|
+
* project paths (node_modules/@timber-js/app/...) so the chunk
|
|
103
|
+
* assignment is consistent regardless of how timber is installed.
|
|
100
104
|
*/
|
|
101
105
|
function isTimberRuntime(id: string): boolean {
|
|
102
106
|
return (
|
|
103
107
|
id.includes('/timber-app/') ||
|
|
108
|
+
id.includes('/@timber-js/app/') ||
|
|
104
109
|
id.includes('react-server-dom') ||
|
|
105
110
|
id.includes('@vitejs/plugin-rsc')
|
|
106
111
|
);
|
|
@@ -175,7 +180,8 @@ export function assignClientChunk(meta: {
|
|
|
175
180
|
serverChunk: string;
|
|
176
181
|
}): string | undefined {
|
|
177
182
|
// Timber framework client modules → vendor-timber
|
|
178
|
-
|
|
183
|
+
// Match both monorepo paths (/timber-app/) and consumer paths (/@timber-js/app/)
|
|
184
|
+
if (meta.id.includes('/timber-app/') || meta.id.includes('/@timber-js/app/')) return 'vendor-timber';
|
|
179
185
|
|
|
180
186
|
// Small user client components → shared-client (prevents facade micro-chunks)
|
|
181
187
|
if (!meta.id.includes('\0') && meta.id.startsWith('/')) {
|