mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-12-23 22:58:17 -05:00
chore: Update svelte.config.js to use adapter based on environment
This commit is contained in:
@@ -1,6 +1,15 @@
|
|||||||
import adapter from '@sveltejs/adapter-node';
|
|
||||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||||
|
|
||||||
|
import adapterNode from '@sveltejs/adapter-node';
|
||||||
|
import adapterVercel from '@sveltejs/adapter-vercel';
|
||||||
|
|
||||||
|
let adapter;
|
||||||
|
if (process.env.VERCEL) {
|
||||||
|
adapter = adapterVercel;
|
||||||
|
} else {
|
||||||
|
adapter = adapterNode;
|
||||||
|
}
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
||||||
|
|||||||
Reference in New Issue
Block a user