Skip to content

Commit

Permalink
disable media redirect prod build
Browse files Browse the repository at this point in the history
  • Loading branch information
kahlstrm committed Jan 18, 2024
1 parent 616d128 commit a11d358
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ module.exports = {
reactStrictMode: true,
images: {
// TODO: only for dev:
remotePatterns: [
{
protocol: "http",
hostname: "localhost",
port: process.env.PAYLOAD_PORT,
pathname: "/media/**",
},
],
remotePatterns:
process.env.NODE_ENV === "development"
? [
{
protocol: "http",
hostname: "localhost",
port: process.env.PAYLOAD_PORT,
pathname: "/media/**",
},
]
: undefined,
},
};

0 comments on commit a11d358

Please sign in to comment.