-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
42 lines (41 loc) · 1.03 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
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import path from 'path';
import { componentTagger } from "lovable-tagger";
import { lastModifiedPlugin } from './src/plugins/lastModifiedPlugin';
export default defineConfig(({ mode }) => ({
server: {
host: "::",
port: 8080,
headers: {
'Access-Control-Allow-Origin': '*',
},
allowedHosts: [
'localhost',
'127.0.0.1',
'*.replit.dev',
'*.repl.co',
'ed283830-3aad-4490-a326-01ef0401e16d-00-3ackej8lp5xd9.janeway.replit.dev',
'wf-import-excel.replit.app'
],
},
plugins: [
react(),
mode === 'development' && componentTagger(),
mode === 'development' && lastModifiedPlugin(),
].filter(Boolean),
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
},
build: {
outDir: 'dist',
chunkSizeWarningLimit: 1000,
target: 'esnext',
},
esbuild: {
logOverride: { 'this-is-undefined-in-esm': 'silent' }
},
envPrefix: ['VITE_', 'NEXT_PUBLIC_'],
}));