forked from jeffvli/feishin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb.vite.config.ts
More file actions
52 lines (51 loc) · 1.59 KB
/
web.vite.config.ts
File metadata and controls
52 lines (51 loc) · 1.59 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
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig, normalizePath } from 'vite';
import { ViteEjsPlugin } from 'vite-plugin-ejs';
export default defineConfig({
base: './',
build: {
emptyOutDir: true,
outDir: path.resolve(__dirname, './out/web'),
rollupOptions: {
input: {
favicon: normalizePath(path.resolve(__dirname, './assets/icons/favicon.ico')),
index: normalizePath(path.resolve(__dirname, './src/renderer/index.html')),
},
output: {
assetFileNames: 'assets/[name].[ext]',
},
},
sourcemap: true,
},
css: {
modules: {
localsConvention: 'camelCase',
},
},
optimizeDeps: {
exclude: [
'@atlaskit/pragmatic-drag-and-drop',
'@atlaskit/pragmatic-drag-and-drop-auto-scroll',
'@atlaskit/pragmatic-drag-and-drop-hitbox',
'@tanstack_react-query-persist-client',
'idb-keyval',
],
},
plugins: [
react(),
ViteEjsPlugin({
root: normalizePath(path.resolve(__dirname, './src/renderer')),
web: true,
}),
],
resolve: {
alias: {
'/@/i18n': path.resolve(__dirname, './src/i18n'),
'/@/remote': path.resolve(__dirname, './src/remote'),
'/@/renderer': path.resolve(__dirname, './src/renderer'),
'/@/shared': path.resolve(__dirname, './src/shared'),
},
},
root: path.resolve(__dirname, './src/renderer'),
});