forked from polkadot-cloud/polkadot-staking-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
46 lines (44 loc) · 1.17 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
43
44
45
46
// Copyright 2023 @paritytech/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',
rollupOptions: {
output: {
manualChunks: {
'@substrate/connect': ['@substrate/connect'],
},
},
},
},
server: {
fs: {
strict: true,
},
},
optimizeDeps: {
include: ['react/jsx-runtime'],
},
});