-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add app, error, and document entrypoints (#53013)
### What adds endpoints for `_app` `_error` and `_document` for pages Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
146 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
use indexmap::IndexMap; | ||
use turbo_tasks::Vc; | ||
|
||
use crate::{project::Middleware, route::Route}; | ||
use crate::{ | ||
project::Middleware, | ||
route::{Endpoint, Route}, | ||
}; | ||
|
||
#[turbo_tasks::value(shared)] | ||
pub struct Entrypoints { | ||
pub routes: IndexMap<String, Route>, | ||
pub middleware: Option<Middleware>, | ||
pub pages_document_endpoint: Vc<Box<dyn Endpoint>>, | ||
pub pages_app_endpoint: Vc<Box<dyn Endpoint>>, | ||
pub pages_error_endpoint: Vc<Box<dyn Endpoint>>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters