forked from tokenocean/maven
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
37 lines (33 loc) · 918 Bytes
/
vite.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
// vite.config.js
import { sveltekit } from "@sveltejs/kit/vite";
import wasm from 'vite-plugin-wasm';
import topLevelAwait from 'vite-plugin-top-level-await';
import path from "path";
import { nodePolyfills } from 'vite-plugin-node-polyfills';
/** @type {import('vite').UserConfig} */
const config = {
plugins: [nodePolyfills(), sveltekit(), wasm(), topLevelAwait()],
resolve: {
alias: {
$comp: path.resolve("src/components/index.js"),
$components: path.resolve("src/components"),
$queries: path.resolve("src/queries"),
},
},
server: {
proxy: {
"/api": {
target: "http://localhost:8091",
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
},
ssr: {
noExternal: [
"@fortawesome/free-brands-svg-icons",
"@fortawesome/free-regular-svg-icons",
"@fortawesome/free-solid-svg-icons",
],
},
};
export default config;