forked from DakaraProject/dakara-client-web
/
vite.config.js
38 lines (36 loc) · 966 Bytes
/
vite.config.js
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
import react from '@vitejs/plugin-react-swc';
import { defineConfig } from 'vite';
import jsconfigPaths from 'vite-jsconfig-paths';
import checker from 'vite-plugin-checker';
import packageJson from './package.json';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
jsconfigPaths(),
checker({
enableBuild: false,
eslint: {
lintCommand: packageJson.scripts.lint,
},
stylelint: {
lintCommand: packageJson.scripts.stylelint,
},
}),
],
server: {
port: 3000,
proxy: {
'/api': 'http://127.0.0.1:8000',
'/ws': {
target: 'http://127.0.0.1:8000',
ws: true,
},
},
},
define: {
'import.meta.env.DAKARA_VERSION': JSON.stringify(packageJson.version),
'import.meta.env.DAKARA_BUGTRACKER': JSON.stringify(packageJson.bugs.url),
'import.meta.env.DAKARA_PROJECT_HOMEPAGE': JSON.stringify(packageJson.homepage),
},
});