Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: emit pages as physical entry points
- Loading branch information
Showing
14 changed files
with
208 additions
and
74 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Plugin directory (WIP) | ||
|
||
This file serves as developer documentation to explain how the internal plugins work | ||
|
||
|
||
## `plugin-middleware` | ||
|
||
This plugin is responsible to retrieve the `src/middleware.{ts.js}` file and emit an entry point during the SSR build. | ||
|
||
The final file is emitted only if the user has the middleware file. The final name of the file is `middleware.mjs`. | ||
|
||
The file emitted has this content, more or less: | ||
|
||
```js | ||
import { onRequest } from "@astro-middleware"; | ||
export { onRequest } | ||
``` | ||
|
||
## `plugin-renderers` | ||
|
||
This plugin is responsible to collect all the renderers inside an Astro application and emit them in a single file. | ||
|
||
The emitted file is called `renderers.mjs`. | ||
|
||
The emitted file has content similar to: | ||
|
||
```js | ||
const renderers = [Object.assign({"name":"astro:jsx","serverEntrypoint":"astro/jsx/server.js","jsxImportSource":"astro"}, { ssr: server_default }),]; | ||
|
||
export { renderers }; | ||
``` | ||
|
||
## `plugin-pages` |
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
Oops, something went wrong.