-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsvelte.config.js
More file actions
40 lines (36 loc) · 943 Bytes
/
svelte.config.js
File metadata and controls
40 lines (36 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { existsSync } from 'node:fs';
const verifyBuild = process.env.FILEPATH_VERIFY_BUILD === '1';
const alchemy = verifyBuild
? null
: (await import('alchemy/cloudflare/sveltekit')).default;
const localPlatformProxyConfig = './.alchemy/local/sveltekit-wrangler.jsonc';
const fallbackPlatformProxyConfig = './.alchemy/local/wrangler.jsonc';
const verifyAdapter = {
name: 'filepath-verify-adapter',
async adapt() {}
};
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
kit: {
adapter: verifyBuild
? verifyAdapter
: alchemy({
platformProxy: {
configPath: existsSync(localPlatformProxyConfig)
? localPlatformProxyConfig
: fallbackPlatformProxyConfig
}
})
},
compilerOptions: {
experimental: {
async: true
}
},
alias: {
$shared: 'shared'
}
};
export default config;