forked from bingb0t5/im-in
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
27 lines (26 loc) · 799 Bytes
/
Copy pathvite.config.ts
File metadata and controls
27 lines (26 loc) · 799 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
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import {defineConfig, loadEnv} from 'vite';
export default defineConfig(({mode}) => {
const env = loadEnv(mode, '.', '');
return {
plugins: [react(), tailwindcss()],
define: {
'import.meta.env.VITE_SUPABASE_URL': JSON.stringify(env.VITE_SUPABASE_URL),
'import.meta.env.VITE_SUPABASE_ANON_KEY': JSON.stringify(env.VITE_SUPABASE_ANON_KEY),
},
resolve: {
alias: [
{ find: '@', replacement: path.resolve(__dirname, '.') },
],
},
server: {
// Optional: disable HMR in constrained environments.
hmr: process.env.DISABLE_HMR !== 'true',
fs: {
allow: [path.resolve(__dirname, '.')],
},
},
};
});