File tree Expand file tree Collapse file tree 5 files changed +25
-3
lines changed Expand file tree Collapse file tree 5 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { revalidatePath } from "next/cache";
3
3
export const dynamic = "force-dynamic" ;
4
4
5
5
export async function GET ( ) {
6
- revalidatePath ( "/signal" ) ;
6
+ revalidatePath ( "/signal/ " ) ;
7
7
8
8
return new Response ( "ok" ) ;
9
9
}
Original file line number Diff line number Diff line change
1
+ import Image from "next/image" ;
2
+
3
+ import tomineImg from "../../public/tomine.webp" ;
4
+
5
+ export default function Page ( ) {
6
+ return (
7
+ < div >
8
+ < Image src = { tomineImg } alt = "Picture of Tomine" />
9
+ </ div >
10
+ ) ;
11
+ }
Original file line number Diff line number Diff line change
1
+ import { test , expect } from "@playwright/test" ;
2
+
3
+ test . describe ( "next/image with trailing slash" , ( ) => {
4
+ test ( "next/image with trailing slash" , async ( { page } ) => {
5
+ await page . goto ( "/image" ) ;
6
+ await expect ( page . getByAltText ( "Picture of Tomine" ) ) . toBeVisible ( ) ;
7
+ // The trailing slash should only be there if trailingSlash is enabled in next.config.ts
8
+ expect ( await page . getAttribute ( "img" , "src" ) ) . toMatch ( / ^ \/ _ n e x t \/ i m a g e \/ / ) ;
9
+ } ) ;
10
+ } ) ;
Original file line number Diff line number Diff line change 1
1
import { initOpenNextCloudflareForDev , getDeploymentId } from "@opennextjs/cloudflare" ;
2
+ import { NextConfig } from "next" ;
2
3
3
4
initOpenNextCloudflareForDev ( ) ;
4
5
5
- /** @type {import('next').NextConfig } */
6
- const nextConfig = {
6
+ const nextConfig : NextConfig = {
7
7
typescript : { ignoreBuildErrors : true } ,
8
8
eslint : { ignoreDuringBuilds : true } ,
9
9
experimental : {
10
10
// Generate source map to validate the fix for opennextjs/opennextjs-cloudflare#341
11
11
serverSourceMaps : true ,
12
12
} ,
13
13
deploymentId : getDeploymentId ( ) ,
14
+ trailingSlash : true ,
14
15
} ;
15
16
16
17
export default nextConfig ;
You can’t perform that action at this time.
0 commit comments