-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.ts
More file actions
54 lines (48 loc) · 1.08 KB
/
vite.config.ts
File metadata and controls
54 lines (48 loc) · 1.08 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
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import { viteSingleFile } from 'vite-plugin-singlefile';
import path from 'path';
export default defineConfig({
base: './',
plugins: [
svelte(),
viteSingleFile({
useRecommendedBuildConfig: true,
removeViteModuleLoader: true,
deleteInlinedFiles: true,
}),
],
resolve: {
alias: {
$lib: path.resolve('./src/lib'),
},
},
build: {
outDir: 'dist',
emptyOutDir: true,
target: ['es2015', 'ios12'],
assetsInlineLimit: 100000000,
chunkSizeWarningLimit: 10000,
cssCodeSplit: false,
rollupOptions: {
output: {
inlineDynamicImports: true,
manualChunks: undefined,
},
},
},
optimizeDeps: {
include: ['pdfjs-dist', 'marked', 'highlight.js'],
},
server: {
port: 5173,
host: true,
proxy: {
'/api/aihubmix': {
target: 'https://api.aihubmix.com/v1',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/aihubmix/, ''),
},
},
},
});