Skip to content

Commit

Permalink
warn about disappearing prerendered files
Browse files Browse the repository at this point in the history
  • Loading branch information
lilnasy committed Feb 29, 2024
1 parent bc84ea3 commit dcd5f24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/astro/src/core/build/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ async function generatePath(
if (response.status >= 300 && response.status < 400) {
// If redirects is set to false, don't output the HTML
if (!config.build.redirects) {
throw new Error;
logger.warn("build", `In static builds, redirects must be performed using the \`build.redirects\` configuration. However, the "${pathname}" path returned a response with a ${response.status} HTTP code. As a result, a file for this path will not be built.`);
return;
}
const locationSite = getRedirectLocationOrThrow(response.headers);
Expand Down

0 comments on commit dcd5f24

Please sign in to comment.