2025-10-04 08:13:01 +01:00
|
|
|
import 'dotenv/config';
|
|
|
|
|
|
2024-09-23 01:21:05 +01:00
|
|
|
import adapterNode from '@sveltejs/adapter-node';
|
2025-05-03 15:26:10 +01:00
|
|
|
import adapterVercel from '@sveltejs/adapter-vercel';
|
2024-02-29 06:32:40 +00:00
|
|
|
import path from 'path';
|
2025-11-01 15:49:29 +01:00
|
|
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
2023-08-02 19:35:27 +01:00
|
|
|
|
2025-10-04 08:13:01 +01:00
|
|
|
const useNodeAdapter = process.env.PUBLIC_IS_SELFHOSTED === 'true';
|
2024-09-23 01:21:05 +01:00
|
|
|
|
2023-08-02 19:35:27 +01:00
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
|
|
|
const config = {
|
|
|
|
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
|
|
|
|
// for more information about preprocessors
|
|
|
|
|
preprocess: [vitePreprocess({})],
|
|
|
|
|
kit: {
|
2025-05-03 15:26:10 +01:00
|
|
|
adapter: useNodeAdapter ? adapterNode() : adapterVercel(),
|
2024-02-29 06:32:40 +00:00
|
|
|
alias: {
|
|
|
|
|
$lib: path.resolve('./src/lib'),
|
2025-11-01 16:18:29 +01:00
|
|
|
$mail: path.resolve('./src/mail'),
|
2025-11-24 01:00:50 +01:00
|
|
|
'$src/tools': path.resolve('./node_modules/@cio/ui/src/tools/index.ts'),
|
|
|
|
|
'$src/base/*': path.resolve('./node_modules/@cio/ui/src/base/*'),
|
|
|
|
|
'@cio/ui': path.resolve('./node_modules/@cio/ui/src'),
|
|
|
|
|
'@cio/ui/*': path.resolve('./node_modules/@cio/ui/src/*'),
|
|
|
|
|
'@cio/api': path.resolve('./node_modules/@cio/api/dist'),
|
|
|
|
|
'@cio/api/*': path.resolve('./node_modules/@cio/api/dist/*'),
|
|
|
|
|
'@cio/utils': path.resolve('./node_modules/@cio/utils/dist'),
|
|
|
|
|
'@cio/utils/*': path.resolve('./node_modules/@cio/utils/dist/*'),
|
|
|
|
|
'@cio/db/types': path.resolve('./node_modules/@cio/db/src/types.ts')
|
2024-02-29 06:32:40 +00:00
|
|
|
}
|
2023-08-03 19:24:03 +01:00
|
|
|
}
|
2023-08-02 19:35:27 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default config;
|