forked from nostrocket/oxygen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
37 lines (34 loc) · 912 Bytes
/
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
import adapter from "@sveltejs/adapter-static";
import { vitePreprocess } from "@sveltejs/kit/vite";
import { optimizeImports } from "carbon-preprocess-svelte";
const dev = process.argv.includes("dev");
/** @type {import('@sveltejs/kit').Config} */
const config = {
// preprocess: [
// optimizeImports(),
// vitePreprocess(),
// // preprocess({
// // postcss: true
// // })
// ],
preprocess: [vitePreprocess(), optimizeImports()],
kit: {
adapter: adapter({
fallback: "404.html",
}),
prerender: {
crawl: false,
},
paths: {
base: dev ? "" : "",
//base: '' //don't know how to pass build options to vite compilier, so I just manually change this here when I want to compile it to run static-local.
},
},
vitePlugin: {
inspector: {
holdMode: true,
toggleKeyCombo: "meta-shift",
},
},
};
export default config;