mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +00:00
Compare commits
4 Commits
704d5029e7
...
fec51e1847
Author | SHA1 | Date | |
---|---|---|---|
|
fec51e1847 | ||
|
f94d3f2bc6 | ||
|
9c8cd4b74b | ||
|
b8e36828aa |
@ -189,7 +189,6 @@ export default createConfigForNuxt({
|
||||
},
|
||||
},
|
||||
// Sort rule keys in eslint config
|
||||
// @ts-expect-error incorrect types 🤔
|
||||
{
|
||||
files: ['**/eslint.config.mjs'],
|
||||
name: 'local/sort-eslint-config',
|
||||
|
@ -40,7 +40,7 @@
|
||||
"@nuxt/ui-templates": "workspace:*",
|
||||
"@nuxt/vite-builder": "workspace:*",
|
||||
"@nuxt/webpack-builder": "workspace:*",
|
||||
"@types/node": "22.9.0",
|
||||
"@types/node": "22.9.1",
|
||||
"@unhead/dom": "1.11.11",
|
||||
"@unhead/shared": "1.11.11",
|
||||
"@unhead/vue": "1.11.11",
|
||||
@ -75,7 +75,7 @@
|
||||
"@nuxt/webpack-builder": "workspace:*",
|
||||
"@testing-library/vue": "8.1.0",
|
||||
"@types/eslint__js": "8.42.3",
|
||||
"@types/node": "22.9.0",
|
||||
"@types/node": "22.9.1",
|
||||
"@types/semver": "7.5.8",
|
||||
"@unhead/schema": "1.11.11",
|
||||
"@unhead/vue": "1.11.11",
|
||||
@ -91,7 +91,7 @@
|
||||
"devalue": "5.1.1",
|
||||
"eslint": "9.15.0",
|
||||
"eslint-plugin-no-only-tests": "3.3.0",
|
||||
"eslint-plugin-perfectionist": "3.9.1",
|
||||
"eslint-plugin-perfectionist": "4.0.2",
|
||||
"eslint-typegen": "0.3.2",
|
||||
"h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e",
|
||||
"happy-dom": "15.11.6",
|
||||
|
@ -1,12 +1,12 @@
|
||||
import type { FetchError, FetchOptions } from 'ofetch'
|
||||
import type { NitroFetchRequest, TypedInternalResponse, AvailableRouterMethod as _AvailableRouterMethod } from 'nitro/types'
|
||||
import type { FetchError, FetchOptions } from 'ofetch'
|
||||
import { hash } from 'ohash'
|
||||
import type { MaybeRef, Ref } from 'vue'
|
||||
import { computed, reactive, toValue } from 'vue'
|
||||
import { hash } from 'ohash'
|
||||
|
||||
import { useRequestFetch } from './ssr'
|
||||
import type { AsyncData, AsyncDataOptions, KeysOf, MultiWatchSources, PickFrom } from './asyncData'
|
||||
import { useAsyncData } from './asyncData'
|
||||
import { useRequestFetch } from './ssr'
|
||||
|
||||
// @ts-expect-error virtual file
|
||||
import { fetchDefaults } from '#build/nuxt.config.mjs'
|
||||
@ -171,7 +171,7 @@ export function useFetch<
|
||||
let _$fetch = opts.$fetch || globalThis.$fetch
|
||||
|
||||
// Use fetch with request context and headers for server direct API calls
|
||||
if (import.meta.server && !opts.$fetch) {
|
||||
if (import.meta.server) {
|
||||
const isLocalFetch = typeof _request.value === 'string' && _request.value[0] === '/' && (!toValue(opts.baseURL) || toValue(opts.baseURL)![0] === '/')
|
||||
if (isLocalFetch) {
|
||||
_$fetch = useRequestFetch()
|
||||
|
429
pnpm-lock.yaml
429
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user