-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
38 lines (35 loc) · 1.06 KB
/
svelte.config.js
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
import sveltePreprocess from "svelte-preprocess";
// import node from "@sveltejs/adapter-node";
import adapterNetlify from "@sveltejs/adapter-netlify";
const dev = process.env.NODE_ENV === "development";
/** @type {import('@sveltejs/kit').Config} */
export default {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: [
sveltePreprocess({
postcss: true,
}),
],
kit: {
// By default, `npm run build` will create a standard Node app.
// You can create optimized builds for different platforms by
// specifying a different adapter
adapter: adapterNetlify(),
// hydrate the <div id="svelte"> element in src/app.html
target: "#svelte",
vite: {
ssr: {
noExternal: dev ? [] : ["@supabase/supabasejs"],
},
server: {
hmr: {
clientPort: process.env.HMR_HOST ? 443 : 24678,
host: process.env.HMR_HOST
? process.env.HMR_HOST.substring("https://".length)
: "localhost",
},
},
},
},
};