Use adapter-auto and cleanup
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user