-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
40 lines (37 loc) · 918 Bytes
/
vite.config.ts
File metadata and controls
40 lines (37 loc) · 918 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
import * as path from 'path';
import tailwindcss from '@tailwindcss/vite';
import { tanstackRouter } from '@tanstack/router-plugin/vite';
import react from '@vitejs/plugin-react';
import { defineConfig, loadEnv } from 'vite';
import Pages from 'vite-plugin-pages';
// https://vite.dev/config/
export default defineConfig(({ mode }) => {
const { VITE_URL_BASENAME } = { ...loadEnv(mode, process.cwd()) };
console.log({ VITE_URL_BASENAME, mode });
return {
base: `/${VITE_URL_BASENAME}`,
server: {
port: 5000,
host: true,
},
preview: {
port: 8080,
host: true,
},
plugins: [
tanstackRouter({
target: 'react',
autoCodeSplitting: true,
}),
react(),
tailwindcss(),
Pages(),
],
resolve: {
alias: {
'~': path.resolve(__dirname, 'src'),
html2canvas: 'html2canvas-pro',
},
},
};
});