-
Notifications
You must be signed in to change notification settings - Fork 166
/
vite.config.ts
42 lines (40 loc) · 1.06 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
42
// Copyright 2024 @polkadot-cloud/polkadot-staking-dashboard 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';
// 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 `/polkadot-staking-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: [
eslint(),
react(),
svgr(),
tsconfigPaths(),
checker({
typescript: true,
}),
],
build: {
outDir: 'build',
},
server: {
fs: {
strict: false,
},
},
optimizeDeps: {
include: ['react/jsx-runtime'],
},
worker: {
format: 'es',
},
});