-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
39 lines (38 loc) · 1.08 KB
/
vite.config.js
File metadata and controls
39 lines (38 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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import { resolve } from 'path'
export default defineConfig({
plugins: [
vue(),
vueJsx({
// options are passed on to @vue/babel-plugin-jsx
}),
],
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
'@/ui': resolve(__dirname, 'src/components'),
'@/layout': resolve(__dirname, 'src/layout'),
'@/view': resolve(__dirname, 'src/view'),
'@/store': resolve(__dirname, 'src/store'),
'@/assist': resolve(__dirname, 'src/assist'),
},
},
server: {
open: true,
},
esbuild: {
jsxFactory: 'h',
jsxFragment: 'Fragment',
},
// hostname: '0.0.0.0', // 默认是 localhost
// port: '8000', // 默认是 3000 端口
// open: true, // 浏览器自动打开
// https: false, // 是否开启 https
// ssr: false, // 服务端渲染
base: './', // 生产环境下的公共路径
build: {
outDir: 'docs', // 打包构建输出路径,默认 dist ,如果路径存在,构建之前会被删除
}
})