Use adapter-auto and cleanup

This commit is contained in:
2022-05-31 18:34:17 +02:00
parent ecc051a439
commit e1379402e8
3 changed files with 6 additions and 13 deletions

View File

@@ -1,7 +1,5 @@
import preprocess from 'svelte-preprocess'
const adapter = process.env.ADAPTER || '@sveltejs/adapter-node'
const options = JSON.parse(process.env.OPTIONS || '{}')
import adapter from '@sveltejs/adapter-auto'
/** @type {import('@sveltejs/kit').Config} */
const config = {
@@ -9,6 +7,7 @@ const config = {
preprocess: preprocess(),
kit: {
adapter: adapter(),
alias: {
$components: 'src/components',
$animations: 'src/animations',
@@ -18,8 +17,4 @@ const config = {
}
}
if (adapter) {
config.kit.adapter = (await import(adapter)).default(options)
}
export default config