Skip to content

feat: expose layouts and pages on App#3086

Merged
marvinhagemeister merged 2 commits intomainfrom
app-config
Jul 14, 2025
Merged

feat: expose layouts and pages on App#3086
marvinhagemeister merged 2 commits intomainfrom
app-config

Conversation

@marvinhagemeister
Copy link
Collaborator

@marvinhagemeister marvinhagemeister commented Jul 10, 2025

This PR extracts the functionality from the fs_routes plugin and exposes it onto App. These are the new APIs:

  • app.layout(pattern, route)
  • app.onError(pattern, route)
  • app.notFound(pattern, route)
  • app.route(pattern, route)

This also removes the need for .use(staticFiles()). This line can be safely removed.

Fixes #3040
Fixes #3033
Fixes #2591
Fixes #950
Fixes #1918

This exposes the functionality previously hidden behind the `fs_routes`
plugin for everyone. It's now part of the core Fresh API.
marvinhagemeister added a commit that referenced this pull request Jul 16, 2025
This is a regression introduced in
#3086
marvinhagemeister added a commit that referenced this pull request Jul 16, 2025
This is a regression introduced in #3086
marvinhagemeister added a commit that referenced this pull request Jul 17, 2025
Fixes some regressions found after merging
#3086

- Missing 404 middlewares when mounting sub-apps
- revert more staticFiles logic to always require the middleware like
before
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant