-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
87 lines (79 loc) · 2.19 KB
/
vite.config.ts
File metadata and controls
87 lines (79 loc) · 2.19 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
},
build: {
outDir: 'dist',
rollupOptions: {
input: {
main: path.resolve(__dirname, 'index.html'),
frame: path.resolve(__dirname, 'public/frame.html') // only if needed
}
}
},
server: {
open: '/index.html'
}
});
// import { defineConfig } from 'vite'
// import react from '@vitejs/plugin-react'
// import { resolve } from 'path'
// export default defineConfig({
// plugins: [react()],
// root: './public', // Key change - points to public folder
// build: {
// outDir: '../dist', // Output will go to project root/dist
// emptyOutDir: true,
// rollupOptions: {
// input: {
// main: resolve(__dirname, 'public/index.html'),
// frame: resolve(__dirname, 'public/frame.html')
// }
// }
// },
// server: {
// open: '/index.html' // Ensures correct file opens on dev server start
// }
// })
// import { defineConfig } from 'vite'
// import react from '@vitejs/plugin-react'
// import { resolve } from 'path'
// import type { UserConfig } from 'vite'
// export default defineConfig({
// plugins: [react()],
// build: {
// rollupOptions: {
// input: {
// main: resolve(__dirname, 'public/index.html'), // Main app from src
// frame: resolve(__dirname, 'public/frame.html') // Frame from public
// },
// output: {
// entryFileNames: 'assets/[name].[hash].js',
// chunkFileNames: 'assets/[name].[hash].js',
// assetFileNames: 'assets/[name].[hash].[ext]'
// }
// }
// },
// server: {
// port: 5173,
// open: '/frame.html' // Auto-open frame in dev mode
// },
// publicDir: 'public',
// resolve: {
// alias: {
// '@': resolve(__dirname, 'src') // Optional but recommended
// }
// }
// }) satisfies UserConfig
// import { defineConfig } from 'vite'
// import react from '@vitejs/plugin-react'
// // https://vite.dev/config/
// export default defineConfig({
// plugins: [react()],
// })