12345678910111213141516171819202122232425262728293031 |
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import path from 'path'
- // https://vite.dev/config/
- export default defineConfig({
- plugins: [vue()],
- resolve: {
- alias: {
- '@': path.resolve(__dirname, 'src')
- }
- },
- server: {
- // 添加热更新配置
- hmr: {
- overlay: true
- },
- // 自动打开浏览器
- open: true,
- // 监听文件变化
- watch: {
- usePolling: true
- }
- },
- esbuild: {
- target: 'es2015'
- },
- build: {
- target: 'es2015'
- }
- })
|