switch completely to verce function instead edge function
This commit is contained in:
parent
d8fd0b4a61
commit
8d8c728812
@ -1,25 +1,24 @@
|
|||||||
//import adapter from '@sveltejs/adapter-static';
|
//import adapter from '@sveltejs/adapter-static';
|
||||||
import adapter from '@sveltejs/adapter-vercel';
|
import adapter from "@sveltejs/adapter-vercel";
|
||||||
|
|
||||||
import compression from 'compression';
|
import compression from "compression";
|
||||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
kit: {
|
kit: {
|
||||||
adapter: adapter({
|
adapter: adapter({
|
||||||
// Add the compression middleware to the adapter options
|
// Add the compression middleware to the adapter options
|
||||||
middleware: (handler) => compression()(handler),
|
middleware: (handler) => compression()(handler),
|
||||||
runtime: 'edge',
|
runtime: "nodejs20.x",
|
||||||
regions: ['fra1'],
|
regions: ["fra1"],
|
||||||
worker: true, // Add this line if the adapter supports handling worker files
|
worker: true, // Add this line if the adapter supports handling worker files
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
preprocess: vitePreprocess(),
|
preprocess: vitePreprocess(),
|
||||||
paths: {
|
paths: {
|
||||||
relative: false,
|
relative: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
Loading…
x
Reference in New Issue
Block a user