-
Notifications
You must be signed in to change notification settings - Fork 55
/
vite.config.ts
47 lines (46 loc) · 1.01 KB
/
vite.config.ts
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
import legacy from '@vitejs/plugin-legacy';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import process from 'node:process';
import unocss from 'unocss/vite';
import data from 'unplugin-data/vite';
import { defineConfig } from 'vite';
import { mirror, unAutoImport } from './plugins';
export default defineConfig(() => {
return {
plugins: [
vue(),
vueJsx(),
unocss(),
unAutoImport(),
legacy({ renderLegacyChunks: false, modernPolyfills: true }),
data(),
mirror(),
],
resolve: {
alias: {
'@': process.cwd() + '/src',
},
},
css: {
preprocessorOptions: {
scss: {
// https://github.com/sass/dart-sass/issues/2352#issuecomment-2358290696
api: 'modern',
},
},
},
server: {
host: '127.0.0.1',
port: 8444,
},
preview: {
host: '127.0.0.1',
port: 8444,
},
build: {
target: `chrome70`,
sourcemap: true,
},
};
});