-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
27 lines (25 loc) · 902 Bytes
/
vite.config.ts
File metadata and controls
27 lines (25 loc) · 902 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 { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { tanstackRouter } from '@tanstack/router-plugin/vite';
import viteReact from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import { viteSingleFile } from 'vite-plugin-singlefile';
const __dirname = dirname(fileURLToPath(import.meta.url));
// https://vitejs.dev/config/
export default defineConfig({
base: './',
plugins: [
tanstackRouter({ autoCodeSplitting: true }),
viteReact({ babel: { plugins: ['babel-plugin-react-compiler'] } }),
viteSingleFile(),
{
name: 'rename',
enforce: 'post',
generateBundle(_, bundle) {
bundle['index.html'].fileName = bundle['index.html'].fileName.replace('index', 'singstar');
},
},
],
resolve: { alias: { '@': resolve(__dirname, './src') } },
build: { target: 'baseline-widely-available' },
});