-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
35 lines (33 loc) · 1013 Bytes
/
vite.config.ts
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
import path from "path";
import react from "@vitejs/plugin-react";
import { defineConfig, loadEnv } from "vite";
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd(), "") };
return {
plugins: [react()],
base: process.env.VITE_BASE_URL,
resolve: {
alias: {
components: path.resolve(__dirname, "src/components"),
css: path.resolve(__dirname, "src/css"),
pages: path.resolve(__dirname, "src/pages"),
routes: path.resolve(__dirname, "src/routes"),
libs: path.resolve(__dirname, "src/libs"),
hooks: path.resolve(__dirname, "src/hooks"),
},
},
build: {
rollupOptions: {
output: {
manualChunks: {
shiki: ["shiki"],
shiki_theme: ["shiki/themes/github-light.mjs"],
shiki_lang: ["shiki/langs/ruby.mjs"],
shiki_wasm: ["shiki/wasm"],
},
},
},
},
};
});