refactor: use global setting for Vercel Edge runtime
This commit is contained in:
@@ -3,9 +3,6 @@ import type { LayoutServerLoad } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
import { fetchSwell } from '$utils/functions/shopServer'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const load = (async () => {
|
||||
try {
|
||||
|
||||
@@ -4,9 +4,6 @@ import { fetchAPI } from '$utils/api'
|
||||
import { getRandomItem } from 'utils/array'
|
||||
import { fetchSwell } from '$utils/functions/shopServer'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const load = (async ({ setHeaders }) => {
|
||||
try {
|
||||
|
||||
@@ -3,9 +3,6 @@ import type { PageServerLoad } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
import { fetchSwell } from '$utils/functions/shopServer'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const load = (async ({ params, setHeaders }) => {
|
||||
try {
|
||||
|
||||
@@ -3,9 +3,6 @@ import type { PageServerLoad } from './$types'
|
||||
import { PUBLIC_LIST_AMOUNT } from '$env/static/public'
|
||||
import { fetchAPI, photoFields } from '$utils/api'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const load = (async ({ params, setHeaders }) => {
|
||||
try {
|
||||
|
||||
@@ -2,9 +2,6 @@ import { error } from '@sveltejs/kit'
|
||||
import type { PageServerLoad } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const load = (async ({ params, setHeaders }) => {
|
||||
try {
|
||||
|
||||
@@ -3,9 +3,6 @@ import type { PageServerLoad } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
import { getRandomItems } from 'utils/array'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const load = (async ({ setHeaders }) => {
|
||||
try {
|
||||
|
||||
@@ -2,9 +2,6 @@ import { error } from '@sveltejs/kit'
|
||||
import type { RequestHandler } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const POST = (async ({ request, setHeaders }) => {
|
||||
try {
|
||||
|
||||
@@ -2,9 +2,6 @@ import { error } from '@sveltejs/kit'
|
||||
import type { PageServerLoad } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const load = (async ({ setHeaders }) => {
|
||||
try {
|
||||
|
||||
@@ -3,9 +3,6 @@ import type { RequestHandler } from './$types'
|
||||
import { fetchSwell } from '$utils/functions/shopServer'
|
||||
import { fetchAPI, getAssetUrlKey } from '$utils/api'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
const gCategories = [
|
||||
{
|
||||
|
||||
@@ -3,9 +3,6 @@ import type { PageServerLoad } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
import { PUBLIC_FILTERS_DEFAULT_COUNTRY, PUBLIC_FILTERS_DEFAULT_SORT, PUBLIC_GRID_AMOUNT } from '$env/static/public'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const load = (async ({ url, setHeaders }) => {
|
||||
try {
|
||||
|
||||
@@ -2,9 +2,6 @@ import { error } from '@sveltejs/kit'
|
||||
import type { PageServerLoad } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const load = (async ({ setHeaders }) => {
|
||||
try {
|
||||
|
||||
@@ -2,9 +2,6 @@ import { error } from '@sveltejs/kit'
|
||||
import type { PageServerLoad } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const load = (async ({ setHeaders }) => {
|
||||
try {
|
||||
|
||||
@@ -3,9 +3,6 @@ import type { LayoutServerLoad } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
import { PUBLIC_PREVIEW_COUNT } from '$env/static/public'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const load = (async () => {
|
||||
try {
|
||||
|
||||
@@ -3,9 +3,6 @@ import type { PageServerLoad } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
import { getRandomItems } from 'utils/array'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const load = (async ({ setHeaders }) => {
|
||||
try {
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import { NEWSLETTER_API_TOKEN, NEWSLETTER_LIST_ID } from '$env/static/private'
|
||||
import type { RequestHandler } from './$types'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const POST = (async ({ request, fetch }) => {
|
||||
const data: { email: string } = await request.json()
|
||||
|
||||
@@ -2,9 +2,6 @@ import { error } from '@sveltejs/kit'
|
||||
import type { RequestHandler } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
|
||||
export const config = {
|
||||
runtime: 'edge'
|
||||
}
|
||||
|
||||
export const GET = (async ({ url, setHeaders }) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user