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:
parent
ddf49ef54e
commit
567e6a6d25
2 changed files with 4 additions and 1 deletions
|
@ -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: []
|
||||
|
|
|
@ -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 = [];
|
||||
|
|
Loading…
Add table
Reference in a new issue