mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
refactor: use getRouteRules
(#8251)
This commit is contained in:
parent
c1ab262ea0
commit
7ebd1558ee
@ -58,7 +58,7 @@
|
|||||||
"knitwork": "^0.1.2",
|
"knitwork": "^0.1.2",
|
||||||
"magic-string": "^0.26.7",
|
"magic-string": "^0.26.7",
|
||||||
"mlly": "^0.5.16",
|
"mlly": "^0.5.16",
|
||||||
"nitropack": "npm:nitropack-edge@0.6.0-27766621.5c2c313",
|
"nitropack": "npm:nitropack-edge@0.6.0-27766876.4ff7082",
|
||||||
"nuxi": "3.0.0-rc.11",
|
"nuxi": "3.0.0-rc.11",
|
||||||
"ohash": "^0.1.5",
|
"ohash": "^0.1.5",
|
||||||
"ohmyfetch": "^0.4.19",
|
"ohmyfetch": "^0.4.19",
|
||||||
|
@ -5,7 +5,7 @@ import { appendHeader, getQuery, writeEarlyHints } from 'h3'
|
|||||||
import devalue from '@nuxt/devalue'
|
import devalue from '@nuxt/devalue'
|
||||||
import { joinURL } from 'ufo'
|
import { joinURL } from 'ufo'
|
||||||
import { renderToString as _renderToString } from 'vue/server-renderer'
|
import { renderToString as _renderToString } from 'vue/server-renderer'
|
||||||
import { useRuntimeConfig, useNitroApp, defineRenderHandler, getRouteOptions } from '#internal/nitro'
|
import { useRuntimeConfig, useNitroApp, defineRenderHandler, getRouteRules } from '#internal/nitro'
|
||||||
// eslint-disable-next-line import/no-restricted-paths
|
// eslint-disable-next-line import/no-restricted-paths
|
||||||
import type { NuxtApp, NuxtSSRContext } from '#app'
|
import type { NuxtApp, NuxtSSRContext } from '#app'
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ export default defineRenderHandler(async (event) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get route options (currently to apply `ssr: false`)
|
// Get route options (currently to apply `ssr: false`)
|
||||||
const routeOptions = getRouteOptions(event)
|
const routeOptions = getRouteRules(event)
|
||||||
|
|
||||||
// Initialize ssr context
|
// Initialize ssr context
|
||||||
const ssrContext: NuxtSSRContext = {
|
const ssrContext: NuxtSSRContext = {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
"@types/semver": "^7",
|
"@types/semver": "^7",
|
||||||
"@vitejs/plugin-vue": "^3.1.2",
|
"@vitejs/plugin-vue": "^3.1.2",
|
||||||
"@vueuse/head": "~1.0.0-rc.9",
|
"@vueuse/head": "~1.0.0-rc.9",
|
||||||
"nitropack": "npm:nitropack-edge@0.6.0-27766621.5c2c313",
|
"nitropack": "npm:nitropack-edge@0.6.0-27766876.4ff7082",
|
||||||
"unbuild": "latest",
|
"unbuild": "latest",
|
||||||
"vite": "~3.1.8"
|
"vite": "~3.1.8"
|
||||||
},
|
},
|
||||||
|
@ -429,7 +429,7 @@ importers:
|
|||||||
knitwork: ^0.1.2
|
knitwork: ^0.1.2
|
||||||
magic-string: ^0.26.7
|
magic-string: ^0.26.7
|
||||||
mlly: ^0.5.16
|
mlly: ^0.5.16
|
||||||
nitropack: npm:nitropack-edge@0.6.0-27766621.5c2c313
|
nitropack: npm:nitropack-edge@0.6.0-27766876.4ff7082
|
||||||
nuxi: workspace:*
|
nuxi: workspace:*
|
||||||
ohash: ^0.1.5
|
ohash: ^0.1.5
|
||||||
ohmyfetch: ^0.4.19
|
ohmyfetch: ^0.4.19
|
||||||
@ -473,7 +473,7 @@ importers:
|
|||||||
knitwork: 0.1.2
|
knitwork: 0.1.2
|
||||||
magic-string: 0.26.7
|
magic-string: 0.26.7
|
||||||
mlly: 0.5.16
|
mlly: 0.5.16
|
||||||
nitropack: /nitropack-edge/0.6.0-27766621.5c2c313
|
nitropack: /nitropack-edge/0.6.0-27766876.4ff7082
|
||||||
nuxi: link:../nuxi
|
nuxi: link:../nuxi
|
||||||
ohash: 0.1.5
|
ohash: 0.1.5
|
||||||
ohmyfetch: 0.4.19
|
ohmyfetch: 0.4.19
|
||||||
@ -508,7 +508,7 @@ importers:
|
|||||||
create-require: ^1.1.1
|
create-require: ^1.1.1
|
||||||
defu: ^6.1.0
|
defu: ^6.1.0
|
||||||
jiti: ^1.16.0
|
jiti: ^1.16.0
|
||||||
nitropack: npm:nitropack-edge@0.6.0-27766621.5c2c313
|
nitropack: npm:nitropack-edge@0.6.0-27766876.4ff7082
|
||||||
pathe: ^0.3.9
|
pathe: ^0.3.9
|
||||||
pkg-types: ^0.3.5
|
pkg-types: ^0.3.5
|
||||||
postcss-import-resolver: ^2.0.0
|
postcss-import-resolver: ^2.0.0
|
||||||
@ -537,7 +537,7 @@ importers:
|
|||||||
'@types/semver': 7.3.12
|
'@types/semver': 7.3.12
|
||||||
'@vitejs/plugin-vue': 3.1.2_vite@3.1.8
|
'@vitejs/plugin-vue': 3.1.2_vite@3.1.8
|
||||||
'@vueuse/head': 1.0.0-rc.9
|
'@vueuse/head': 1.0.0-rc.9
|
||||||
nitropack: /nitropack-edge/0.6.0-27766621.5c2c313
|
nitropack: /nitropack-edge/0.6.0-27766876.4ff7082
|
||||||
unbuild: 0.9.4
|
unbuild: 0.9.4
|
||||||
vite: 3.1.8
|
vite: 3.1.8
|
||||||
|
|
||||||
@ -3803,7 +3803,7 @@ packages:
|
|||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/ee-first/1.1.1:
|
/ee-first/1.1.1:
|
||||||
resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
|
resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=}
|
||||||
|
|
||||||
/electron-to-chromium/1.4.266:
|
/electron-to-chromium/1.4.266:
|
||||||
resolution: {integrity: sha512-saJTYECxUSv7eSpnXw0XIEvUkP9x4s/x2mm3TVX7k4rIFS6f5TjBih1B5h437WzIhHQjid+d8ouQzPQskMervQ==}
|
resolution: {integrity: sha512-saJTYECxUSv7eSpnXw0XIEvUkP9x4s/x2mm3TVX7k4rIFS6f5TjBih1B5h437WzIhHQjid+d8ouQzPQskMervQ==}
|
||||||
@ -6443,8 +6443,8 @@ packages:
|
|||||||
/neo-async/2.6.2:
|
/neo-async/2.6.2:
|
||||||
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
|
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
|
||||||
|
|
||||||
/nitropack-edge/0.6.0-27766621.5c2c313:
|
/nitropack-edge/0.6.0-27766876.4ff7082:
|
||||||
resolution: {integrity: sha512-VXWPnI1Lkcdn1EfaXm9BnS9cfC3wb2KsdL40n/0c9beMOALQpb6nu1dA3/HEYr9EOtaRrECU7yQreXUrDngRDQ==}
|
resolution: {integrity: sha512-tG7CPQ7qj2Z7nAXfHyXXyTxp5Q8hlEALKHQCAIrNP9dZYKrdJJRh2ntlIpsLv72oAGUGZUsNoxxzlyWoq1O1Pg==}
|
||||||
engines: {node: ^14.16.0 || ^16.11.0 || ^17.0.0 || ^18.0.0}
|
engines: {node: ^14.16.0 || ^16.11.0 || ^17.0.0 || ^18.0.0}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
|
Loading…
Reference in New Issue
Block a user