forked from digirati-co-uk/timeliner
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.js
More file actions
41 lines (37 loc) · 841 Bytes
/
vite.config.js
File metadata and controls
41 lines (37 loc) · 841 Bytes
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
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import { resolve } from 'path';
export default defineConfig({
esbuild: {
loader: 'jsx',
},
build: {
rollupOptions: {
input: {
index: resolve(__dirname, 'index.html'),
app: resolve(__dirname, 'app/index.html'),
},
},
},
optimizeDeps: {
esbuildOptions: {
loader: {
'.js': 'jsx',
},
},
},
// config options
plugins: [react()],
// Fix for JSS (used by MUI)
define: {
global: {},
// Expose VITE_DOCS to the Vite bundle for conditional rendering in Footer
'process.env.VITE_DOCS': JSON.stringify(process.env.VITE_DOCS),
},
// Vitest options
test: {
include: ['**/*[.-]{test,spec}.?(c|m)[jt]s?(x)'],
globals: true,
watch: false,
},
});