-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
40 lines (39 loc) · 1.26 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
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
base: '/', // Set to root path
build: {
chunkSizeWarningLimit: 1000,
outDir: 'dist',
assetsDir: 'assets',
rollupOptions: {
output: {
manualChunks: {
vendor: ['react', 'react-dom', 'react-router-dom'],
charts: ['chart.js', 'react-chartjs-2', 'chartjs-adapter-date-fns', 'chartjs-plugin-zoom'],
}
}
}
},
optimizeDeps: {
exclude: ['lucide-react']
},
define: {
'process.env': {}
},
server: {
headers: {
'Content-Security-Policy': `
default-src 'self';
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.tradingview.com;
style-src 'self' 'unsafe-inline' https://*.tradingview.com;
img-src 'self' data: https: http:;
font-src 'self' data: https://*.tradingview.com;
connect-src 'self' https://*.tradingview.com wss://*.tradingview.com https://dpvwukegbhgdzamzgelm.supabase.co https://api.kucoin.com https://api.bybit.com https://api.gateio.ws;
frame-src 'self' https://*.tradingview.com;
worker-src 'self' blob: https://*.tradingview.com;
`.replace(/\s+/g, ' ').trim()
}
}
});