-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
41 lines (39 loc) · 1.03 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
39
40
41
import sveltePreprocess from "svelte-preprocess";
import node from "@sveltejs/adapter-node";
/*
const sveltePreprocess = require("svelte-preprocess");
const node = require('@sveltejs/adapter-node');
const pkg = require('./package.json');
*/
/** @type {import('@sveltejs/kit').Config} */
export default {
preprocess: [
sveltePreprocess({
defaults: {
style: "postcss",
},
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: node(),
// hydrate the <div id="svelte"> element in src/app.html
target: "#svelte",
vite: {
server: {
hmr: {
clientPort: process.env.HMR_HOST ? 443 : 24678,
host: process.env.HMR_HOST
? process.env.HMR_HOST.substring("https://".length)
: "localhost",
},
},
ssr: {
noExternal: "", // (pkg.dependencies || {})
},
},
},
};