Skip to content

Commit

Permalink
Merge pull request #977 from abernier/patch-1
Browse files Browse the repository at this point in the history
`process.env.BASE_PATH` doc
  • Loading branch information
timlrx committed Jul 30, 2024
2 parents 2984b87 + d2e32a8 commit 1a32fb7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ Then, deploy the generated `out` folder or run `npx serve out` it locally.
> ```sh
> $ EXPORT=1 UNOPTIMIZED=1 BASE_PATH=/myblog yarn build
> ```
>
> => 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)
> [!TIP]
> 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.
Expand Down

0 comments on commit 1a32fb7

Please sign in to comment.