Skip to content

Commit

Permalink
No need to special-case redirects in static build
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed May 23, 2023
1 parent 12e5910 commit d0f7e12
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/astro/src/core/build/static-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { createPluginContainer, type AstroBuildPluginContainer } from './plugin.
import { registerAllPlugins } from './plugins/index.js';
import { RESOLVED_MIDDLEWARE_MODULE_ID } from './plugins/plugin-middleware.js';
import type { PageBuildData, StaticBuildOptions } from './types';
import { routeIsRedirect } from '../redirects/index.js';
import { getTimeStat } from './util.js';

export async function viteBuild(opts: StaticBuildOptions) {
Expand Down Expand Up @@ -57,11 +56,6 @@ export async function viteBuild(opts: StaticBuildOptions) {
// Track the page data in internals
trackPageData(internals, component, pageData, astroModuleId, astroModuleURL);

// Redirects are config-only, do not add them as input
if(routeIsRedirect(pageData.route)) {
//continue;
}

pageInput.add(astroModuleId);
facadeIdToPageDataMap.set(fileURLToPath(astroModuleURL), pageData);
}
Expand Down

0 comments on commit d0f7e12

Please sign in to comment.