File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export default {
9
9
cacheKey ,
10
10
"composable" ,
11
11
) ;
12
- if ( ! result || ! result . value ?. value ) {
12
+ if ( ! result ? .value ?. value ) {
13
13
return undefined ;
14
14
}
15
15
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import * as buildHelper from "./helper.js";
7
7
*
8
8
* @param options Build options.
9
9
* @param format Output format.
10
- * @returns The path to the compiled file .
10
+ * @returns An object containing the paths to the compiled cache and composable cache files .
11
11
*/
12
12
export function compileCache (
13
13
options : buildHelper . BuildOptions ,
@@ -16,10 +16,6 @@ export function compileCache(
16
16
const { config } = options ;
17
17
const ext = format === "cjs" ? "cjs" : "mjs" ;
18
18
const compiledCacheFile = path . join ( options . buildDir , `cache.${ ext } ` ) ;
19
- const compiledComposableCacheFile = path . join (
20
- options . buildDir ,
21
- `composable-cache.${ ext } ` ,
22
- ) ;
23
19
24
20
const isAfter15 = buildHelper . compareSemver (
25
21
options . nextVersion ,
@@ -50,6 +46,11 @@ export function compileCache(
50
46
options ,
51
47
) ;
52
48
49
+ const compiledComposableCacheFile = path . join (
50
+ options . buildDir ,
51
+ `composable-cache.${ ext } ` ,
52
+ ) ;
53
+
53
54
// Composable cache
54
55
buildHelper . esbuildSync (
55
56
{
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ export const patchUseCacheForISR: CodePatcher = {
142
142
versions : ">=15.3.0" ,
143
143
field : {
144
144
pathFilter : getCrossPlatformPathRegex (
145
- String . raw `(server/chunks/.*\.js|.* \.runtime\..*\.js|use-cache/use-cache-wrapper\.js)$` ,
145
+ String . raw `(server/chunks/.*\.js|\.runtime\..*\.js|use-cache/use-cache-wrapper\.js)$` ,
146
146
{ escape : false } ,
147
147
) ,
148
148
contentFilter : / \. i s O n D e m a n d R e v a l i d a t e / ,
You can’t perform that action at this time.
0 commit comments