forked from tokenocean/cozmos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
43 lines (42 loc) · 1.09 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
42
43
import preprocess from "svelte-preprocess";
import tailwind from "tailwindcss";
import autoprefixer from "autoprefixer";
import postcss from "postcss-preset-env";
import nesting from "postcss-nesting";
import path from "path";
import node from "@sveltejs/adapter-node";
import shim from "@asoltys/vite-plugin-stream-shim";
export default {
kit: {
adapter: node(),
// target: "#svelte",
vite: {
build: {
sourcemap: true,
},
plugins: [shim()],
resolve: {
alias: {
$comp: path.resolve("src/components/index.js"),
$components: path.resolve("src/components"),
$styleguide: path.resolve("src/styleguide"),
$queries: path.resolve("src/queries"),
$icons: path.resolve("src/icons"),
},
},
server: {
proxy: {
"/api": {
target: "http://localhost:8091",
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
},
},
},
preprocess: preprocess({
postcss: {
plugins: [tailwind(), autoprefixer(), nesting()],
},
}),
};