File tree 9 files changed +183
-1
lines changed
9 files changed +183
-1
lines changed Original file line number Diff line number Diff line change @@ -1832,7 +1832,10 @@ export const onPrerenderRoute =
1832
1832
if ( nonDynamicSsg || isFallback || isOmitted ) {
1833
1833
outputPathData = outputPathData . replace (
1834
1834
new RegExp ( `${ escapeStringRegexp ( origRouteFileNoExt ) } .json$` ) ,
1835
- `${ routeFileNoExt } .json`
1835
+ // ensure we escape "$" correctly while replacing as "$" is a special
1836
+ // character, we need to do double escaping as first is for the initial
1837
+ // replace on the routeFile and then the second on the outputPath
1838
+ `${ routeFileNoExt . replace ( / \$ / g, '$$$$' ) } .json`
1836
1839
) ;
1837
1840
}
1838
1841
Original file line number Diff line number Diff line change
1
+ function Page ( { date } ) {
2
+ return (
3
+ < >
4
+ < h1 > $$</ h1 >
5
+ < p > Date: { date } </ p >
6
+ </ >
7
+ ) ;
8
+ }
9
+
10
+ export async function getStaticProps ( ) {
11
+ return {
12
+ props : {
13
+ date : new Date ( ) . toISOString ( ) ,
14
+ page : '$$' ,
15
+ } ,
16
+ } ;
17
+ }
18
+
19
+ export default Page ;
Original file line number Diff line number Diff line change
1
+ function Page ( { date } ) {
2
+ return (
3
+ < >
4
+ < h1 > $$b</ h1 >
5
+ < p > Date: { date } </ p >
6
+ </ >
7
+ ) ;
8
+ }
9
+
10
+ export async function getStaticProps ( ) {
11
+ return {
12
+ props : {
13
+ date : new Date ( ) . toISOString ( ) ,
14
+ page : '$$b' ,
15
+ } ,
16
+ revalidate : 5 ,
17
+ } ;
18
+ }
19
+
20
+ export default Page ;
Original file line number Diff line number Diff line change
1
+ function Page ( { date } ) {
2
+ return (
3
+ < >
4
+ < h1 > b$$</ h1 >
5
+ < p > Date: { date } </ p >
6
+ </ >
7
+ ) ;
8
+ }
9
+
10
+ export async function getStaticProps ( ) {
11
+ return {
12
+ props : {
13
+ date : new Date ( ) . toISOString ( ) ,
14
+ page : 'b$$' ,
15
+ } ,
16
+ revalidate : 5 ,
17
+ } ;
18
+ }
19
+
20
+ export default Page ;
Original file line number Diff line number Diff line change 7
7
}
8
8
],
9
9
"probes" : [
10
+ {
11
+ "path" : " /$$" ,
12
+ "status" : 200 ,
13
+ "mustContain" : " >$$<"
14
+ },
15
+ {
16
+ "path" : " /_next/data/testing-build-id/en/$$.json" ,
17
+ "status" : 200 ,
18
+ "mustContain" : " \" $$\" "
19
+ },
20
+ {
21
+ "path" : " /$$b" ,
22
+ "status" : 200 ,
23
+ "mustContain" : " >$$b<"
24
+ },
25
+ {
26
+ "path" : " /_next/data/testing-build-id/en/$$b.json" ,
27
+ "status" : 200 ,
28
+ "mustContain" : " \" $$b\" "
29
+ },
30
+ {
31
+ "path" : " /b$$" ,
32
+ "status" : 200 ,
33
+ "mustContain" : " >b$$<"
34
+ },
35
+ {
36
+ "path" : " /_next/data/testing-build-id/en/b$$.json" ,
37
+ "status" : 200 ,
38
+ "mustContain" : " \" b$$\" "
39
+ },
10
40
{
11
41
"path" : " /" ,
12
42
"headers" : {
Original file line number Diff line number Diff line change
1
+ function Page ( { date } ) {
2
+ return (
3
+ < >
4
+ < h1 > $$</ h1 >
5
+ < p > Date: { date } </ p >
6
+ </ >
7
+ ) ;
8
+ }
9
+
10
+ export async function getStaticProps ( ) {
11
+ return {
12
+ props : {
13
+ date : new Date ( ) . toISOString ( ) ,
14
+ page : '$$' ,
15
+ } ,
16
+ revalidate : 5 ,
17
+ } ;
18
+ }
19
+
20
+ export default Page ;
Original file line number Diff line number Diff line change
1
+ function Page ( { date } ) {
2
+ return (
3
+ < >
4
+ < h1 > $$b</ h1 >
5
+ < p > Date: { date } </ p >
6
+ </ >
7
+ ) ;
8
+ }
9
+
10
+ export async function getStaticProps ( ) {
11
+ return {
12
+ props : {
13
+ date : new Date ( ) . toISOString ( ) ,
14
+ page : '$$b' ,
15
+ } ,
16
+ revalidate : 5 ,
17
+ } ;
18
+ }
19
+
20
+ export default Page ;
Original file line number Diff line number Diff line change
1
+ function Page ( { date } ) {
2
+ return (
3
+ < >
4
+ < h1 > b$$</ h1 >
5
+ < p > Date: { date } </ p >
6
+ </ >
7
+ ) ;
8
+ }
9
+
10
+ export async function getStaticProps ( ) {
11
+ return {
12
+ props : {
13
+ date : new Date ( ) . toISOString ( ) ,
14
+ page : 'b$$' ,
15
+ } ,
16
+ revalidate : 5 ,
17
+ } ;
18
+ }
19
+
20
+ export default Page ;
Original file line number Diff line number Diff line change 26
26
}
27
27
],
28
28
"probes" : [
29
+ {
30
+ "path" : " /$$" ,
31
+ "status" : 200 ,
32
+ "mustContain" : " >$$<"
33
+ },
34
+ {
35
+ "path" : " /_next/data/testing-build-id/$$.json" ,
36
+ "status" : 200 ,
37
+ "mustContain" : " \" $$\" "
38
+ },
39
+ {
40
+ "path" : " /$$b" ,
41
+ "status" : 200 ,
42
+ "mustContain" : " >$$b<"
43
+ },
44
+ {
45
+ "path" : " /_next/data/testing-build-id/$$b.json" ,
46
+ "status" : 200 ,
47
+ "mustContain" : " \" $$b\" "
48
+ },
49
+ {
50
+ "path" : " /b$$" ,
51
+ "status" : 200 ,
52
+ "mustContain" : " >b$$<"
53
+ },
54
+ {
55
+ "path" : " /_next/data/testing-build-id/b$$.json" ,
56
+ "status" : 200 ,
57
+ "mustContain" : " \" b$$\" "
58
+ },
29
59
{
30
60
"path" : " /" ,
31
61
"status" : 200 ,
You can’t perform that action at this time.
0 commit comments