33 lines
908 B
JavaScript
33 lines
908 B
JavaScript
import { resolve } from 'path'
|
|
import preprocess from 'svelte-preprocess'
|
|
|
|
const adapter = process.env.ADAPTER || '@sveltejs/adapter-node'
|
|
const options = JSON.parse(process.env.OPTIONS || '{}')
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
// Preprocessors docs: https://github.com/sveltejs/svelte-preprocess
|
|
preprocess: preprocess(),
|
|
|
|
kit: {
|
|
target: '#housesof',
|
|
|
|
// Vite configuration: https://vitejs.dev/config/
|
|
vite: {
|
|
resolve: {
|
|
alias: {
|
|
$components: resolve('src/components'),
|
|
$animations: resolve('src/animations'),
|
|
$modules: resolve('src/modules'),
|
|
$utils: resolve('src/utils'),
|
|
}
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
if (adapter) {
|
|
config.kit.adapter = (await import(adapter)).default(options)
|
|
}
|
|
|
|
export default config |