forked from Bourichi-Taha/chatbot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
51 lines (40 loc) · 941 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// vite.config.js
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// import react from "@vitejs/plugin-react-swc";
import viteTsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
esbuild: {
loader: "jsx",
},
build: {
outDir: "build",
},
optimizeDeps: {
esbuildOptions: {
loader: {
".js": "jsx",
},
},
},
// depending on your application, base can also be "/"
base: "",
plugins: [
react(),
viteTsconfigPaths(),
// { enforce: "pre", ...mdx() },
// react({ include: /\.(mdx|js|jsx|ts|tsx)$/ }),
// svgrPlugin({
// svgrOptions: {
// icon: true,
// // ...svgr options (https://react-svgr.com/docs/options/)
// },
// }),
],
server: {
// this ensures that the browser opens upon server start
open: true,
// this sets a default port to 3000
port: 3000,
},
});