-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
41 lines (39 loc) · 1.02 KB
/
vite.config.ts
File metadata and controls
41 lines (39 loc) · 1.02 KB
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 browserEcho from '@browser-echo/vite';
import tailwindcss from '@tailwindcss/vite';
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
import react from '@vitejs/plugin-react';
import Icons from 'unplugin-icons/vite';
import { defineConfig, loadEnv, type ConfigEnv } from 'vite';
import tsConfigPaths from 'vite-tsconfig-paths';
import { nitro } from 'nitro/vite';
export default ({ mode }: ConfigEnv) => {
const env = loadEnv(mode, process.cwd(), '');
Object.assign(process.env, env);
return defineConfig({
server: {
port: 3000,
},
plugins: [
tsConfigPaths({
projects: ['./tsconfig.json'],
}),
tanstackStart(),
nitro(),
react(),
Icons({
compiler: 'jsx',
jsx: 'react',
}),
browserEcho({
include: ['error', 'warn', 'info'],
stackMode: 'condensed',
tag: 'tanstack-start',
showSource: true,
fileLog: {
enabled: false,
},
}),
tailwindcss(),
],
});
};