Skip to content

Commit

Permalink
Add comment about defaultRoutes
Browse files Browse the repository at this point in the history
matthewp committed Jul 1, 2024
1 parent ddf49ef commit 567e6a6
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/astro/src/core/app/pipeline.ts
Original file line number Diff line number Diff line change
@@ -101,7 +101,6 @@ export class AppPipeline extends Pipeline {
async getModuleForRoute(route: RouteData): Promise<SinglePageBuiltModule> {
for(const defaultRoute of this.defaultRoutes) {
if(route.component === defaultRoute.component) {
//return defaultRoute.instance;
return {
page: () => Promise.resolve(defaultRoute.instance),
renderers: []
4 changes: 4 additions & 0 deletions packages/astro/src/core/base-pipeline.ts
Original file line number Diff line number Diff line change
@@ -54,6 +54,10 @@ export abstract class Pipeline {
*/
readonly site = manifest.site ? new URL(manifest.site) : undefined,
readonly callSetGetEnv = true,
/**
* Array of built-in, internal, routes.
* Used to find the route module
*/
readonly defaultRoutes = createDefaultRoutes(manifest, new URL(import.meta.url))
) {
this.internalMiddleware = [];

0 comments on commit 567e6a6

Please sign in to comment.