chore: add Cloudflare adapter and switch to auto adapter in Svelte configuration
This commit is contained in:
@@ -85,6 +85,7 @@
|
|||||||
"@eslint/compat": "^1.4.0",
|
"@eslint/compat": "^1.4.0",
|
||||||
"@eslint/js": "^9.36.0",
|
"@eslint/js": "^9.36.0",
|
||||||
"@rollup/plugin-replace": "^6.0.2",
|
"@rollup/plugin-replace": "^6.0.2",
|
||||||
|
"@sveltejs/adapter-cloudflare": "^7.2.8",
|
||||||
"@sveltejs/kit": "^2.5.27",
|
"@sveltejs/kit": "^2.5.27",
|
||||||
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
|
|
||||||
import adapterNode from '@sveltejs/adapter-node';
|
// import adapterNode from '@sveltejs/adapter-node';
|
||||||
import adapterVercel from '@sveltejs/adapter-vercel';
|
import adapterAuto from '@sveltejs/adapter-auto';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ const config = {
|
|||||||
// for more information about preprocessors
|
// for more information about preprocessors
|
||||||
preprocess: [vitePreprocess({})],
|
preprocess: [vitePreprocess({})],
|
||||||
kit: {
|
kit: {
|
||||||
adapter: useNodeAdapter ? adapterNode() : adapterVercel(),
|
adapter: adapterAuto(),
|
||||||
alias: {
|
alias: {
|
||||||
$lib: path.resolve('./src/lib'),
|
$lib: path.resolve('./src/lib'),
|
||||||
$features: path.resolve('./src/lib/features'),
|
$features: path.resolve('./src/lib/features'),
|
||||||
|
|||||||
Reference in New Issue
Block a user