Skip to content

Commit

Permalink
feat(project): load viewData before routers by default and document u…
Browse files Browse the repository at this point in the history
…sage
  • Loading branch information
ernscht committed Nov 2, 2023
1 parent d09f9e6 commit 159ee1c
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ server: {

If set to `true`, all requests through express will be compressed.

### `server.loadViewDataBeforeRoutes`

- Type: Boolean
- Default: true

If set to `true`, viewData is processed before all routes.
For backwards compatibility, you can set it to `false`, to get the loading behavior before Nitro version 9.

## Gulp

### `gulp.dumpViews`
Expand Down
2 changes: 1 addition & 1 deletion packages/nitro-app/app/core/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const defaultConfig = {
'src/patterns/',
'.node-version',
],
loadViewDataBeforeRoutes: false,
loadViewDataBeforeRoutes: true,
},
gulp: {
dumpViews: {
Expand Down
8 changes: 8 additions & 0 deletions packages/project-nitro-twig/project/docs/nitro-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ server: {

If set to `true`, all requests through express will be compressed.

### `server.loadViewDataBeforeRoutes`

- Type: Boolean
- Default: true

If set to `true`, viewData is processed before all routes.
For backwards compatibility, you can set it to `false`, to get the loading behavior before Nitro version 9.

## Gulp

### `gulp.dumpViews`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ server: {

If set to `true`, all requests through express will be compressed.

### `server.loadViewDataBeforeRoutes`

- Type: Boolean
- Default: true

If set to `true`, viewData is processed before all routes.
For backwards compatibility, you can set it to `false`, to get the loading behavior before Nitro version 9.

## Gulp

### `gulp.dumpViews`
Expand Down
8 changes: 8 additions & 0 deletions packages/project-nitro/project/docs/nitro-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ server: {

If set to `true`, all requests through express will be compressed.

### `server.loadViewDataBeforeRoutes`

- Type: Boolean
- Default: true

If set to `true`, viewData is processed before all routes.
For backwards compatibility, you can set it to `false`, to get the loading behavior before Nitro version 9.

## Gulp

### `gulp.dumpViews`
Expand Down

0 comments on commit 159ee1c

Please sign in to comment.