25 lines
640 B
JavaScript
25 lines
640 B
JavaScript
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: {
|
|
alias: {
|
|
$components: 'src/components',
|
|
$animations: 'src/animations',
|
|
$modules: 'src/modules',
|
|
$utils: 'src/utils',
|
|
}
|
|
}
|
|
}
|
|
|
|
if (adapter) {
|
|
config.kit.adapter = (await import(adapter)).default(options)
|
|
}
|
|
|
|
export default config |