0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-13 22:11:20 -05:00

Add comment about defaultRoutes

This commit is contained in:
Matthew Phillips 2024-07-01 11:04:37 -04:00
parent ddf49ef54e
commit 567e6a6d25
2 changed files with 4 additions and 1 deletions

View file

@ -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: []

View file

@ -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 = [];