-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
41 lines (39 loc) · 1.07 KB
/
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
// Copyright 2024 @polkadot-blockchain-academy/alumni-hub authors & contributors
// SPDX-License-Identifier: GPL-3.0-only
import react from "@vitejs/plugin-react-swc"
import { defineConfig } from "vite"
import checker from "vite-plugin-checker"
import eslint from "vite-plugin-eslint"
import svgr from "vite-plugin-svgr"
import tsconfigPaths from "vite-tsconfig-paths"
import mdx from "@mdx-js/rollup"
// https://vitejs.dev/config/
//
// NOTES:
// - `base` is configured in `package.json` with the vite --base flag. In local dev it is `/`,
// whereas gh-pages always deploys to `/dashboard/`. Producution builds can also
// be configureed with the `--base` flag.
// - `BASE_URL`env variable is used in the codebase to refer to the supplied base.
export default defineConfig({
plugins: [
{ enforce: "pre", ...mdx() },
eslint(),
react(),
svgr(),
tsconfigPaths(),
checker({
typescript: true,
}),
],
build: {
outDir: "build",
},
server: {
fs: {
strict: true,
},
},
optimizeDeps: {
include: ["react/jsx-runtime"],
},
})