Skip to content

Commit 1a32fb7

Browse files
authored
Merge pull request #977 from abernier/patch-1
`process.env.BASE_PATH` doc
2 parents 2984b87 + d2e32a8 commit 1a32fb7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ Then, deploy the generated `out` folder or run `npx serve out` it locally.
301301
> ```sh
302302
> $ EXPORT=1 UNOPTIMIZED=1 BASE_PATH=/myblog yarn build
303303
> ```
304+
>
305+
> => In your code, `${process.env.BASE_PATH || ''}/robots.txt` will print `"/myblog/robots.txt"` in the `out` build (or only `/robots.txt` if `yarn dev`, ie: on localhost:3000)
304306
305307
> [!TIP]
306308
> Alternatively to `UNOPTIMIZED=1`, to continue using `next/image`, you can use an alternative image optimization provider such as Imgix, Cloudinary or Akamai. See [image optimization documentation](https://nextjs.org/docs/app/building-your-application/deploying/static-exports#image-optimization) for more details.

0 commit comments

Comments
 (0)