-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
35 lines (34 loc) · 855 Bytes
/
vite.config.js
File metadata and controls
35 lines (34 loc) · 855 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
import { resolve } from 'path';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import legacy from '@vitejs/plugin-legacy';
export default defineConfig(({ mode }) => {
return {
base: './',
build: {
rollupOptions: {
input: {
'index': resolve(__dirname, 'index.html'),
'swiper': resolve(__dirname, 'components/swiper/demo/index.html'),
'animation': resolve(__dirname, 'components/animation/demo/index.html'),
},
},
minify: false, // iOS 9 等低版本加载压缩代码报脚本异常
},
esbuild: {},
server: {
host: '0.0.0.0',
port: 8080,
},
preview: {
host: '0.0.0.0',
port: 8080,
},
plugins: [
legacy({
targets: ['iOS >= 9'],
}),
tsconfigPaths(),
],
};
});