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> {
|
async getModuleForRoute(route: RouteData): Promise<SinglePageBuiltModule> {
|
||||||
for(const defaultRoute of this.defaultRoutes) {
|
for(const defaultRoute of this.defaultRoutes) {
|
||||||
if(route.component === defaultRoute.component) {
|
if(route.component === defaultRoute.component) {
|
||||||
//return defaultRoute.instance;
|
|
||||||
return {
|
return {
|
||||||
page: () => Promise.resolve(defaultRoute.instance),
|
page: () => Promise.resolve(defaultRoute.instance),
|
||||||
renderers: []
|
renderers: []
|
||||||
|
|
|
@ -54,6 +54,10 @@ export abstract class Pipeline {
|
||||||
*/
|
*/
|
||||||
readonly site = manifest.site ? new URL(manifest.site) : undefined,
|
readonly site = manifest.site ? new URL(manifest.site) : undefined,
|
||||||
readonly callSetGetEnv = true,
|
readonly callSetGetEnv = true,
|
||||||
|
/**
|
||||||
|
* Array of built-in, internal, routes.
|
||||||
|
* Used to find the route module
|
||||||
|
*/
|
||||||
readonly defaultRoutes = createDefaultRoutes(manifest, new URL(import.meta.url))
|
readonly defaultRoutes = createDefaultRoutes(manifest, new URL(import.meta.url))
|
||||||
) {
|
) {
|
||||||
this.internalMiddleware = [];
|
this.internalMiddleware = [];
|
||||||
|
|
Loading…
Add table
Reference in a new issue