aboutsummaryrefslogtreecommitdiff
path: root/svelte.config.js
blob: 23b0e12c483798282b0057e4f9fbd950b0911346 (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// import adapter from '@sveltejs/adapter-cloudflare'
import adapter from '@sveltejs/adapter-auto'
import preprocess from 'svelte-preprocess'
import dotenv from 'dotenv'

dotenv.config()


/** @type {import('@sveltejs/kit').Config} */
const config = {
	// Consult https://github.com/sveltejs/svelte-preprocess
	// for more information about preprocessors
	preprocess: preprocess(),

	kit: {
		adapter: adapter(),
		// adapter: adapter({
		// 	out: 'build',
		// 	precompress: true,
		// 	env: {
		// 		host: '127.0.0.1'
		// 	}
		// }),


		// Override http methods in the Todo forms
		methodOverride: {
			allowed: ['PATCH', 'DELETE']
		},

		// https://vitejs.dev/config/
		vite: {
			// 	plugins: [createHtmlPlugin({
			// 		minify: true
			// 	})],
			build: {
				rollupOptions: {
					// external: ['discord-api-types/payloads/v9', 'discord-api-types', 'discord-api-types/v9'],
					output: {
						manualChunks: undefined,
					},
				},
			},
			// if the user is on replit or gitpod, use a secure websocket
			// server:
			// 	process.env.REPL_ID || process.env.GITPOD_WORKSPACE_ID
			// 		? {
			// 			hmr: {
			// 				protocol: 'wss',
			// 				port: 443,
			// 			},
			// 		}
			// 		: {},
		},
	}
}

export default config