intelligent_monitoring_fron.../Code/frontend/vite.config.js

35 lines
687 B
JavaScript
Raw Normal View History

2024-10-17 15:05:15 +08:00
import {
defineConfig
} from 'vite'
import vue from '@vitejs/plugin-vue'
const path = require('path')
import { resolve } from 'path' // 主要用于alias文件路径别名
// https://vitejs.dev/config/
export default defineConfig({
// 在文件中添加以下内容
server: {
host: '0.0.0.0'
},
resolve: {
alias: {
'@': resolve(__dirname, '.', 'src'),
},
},
plugins: [vue()],
// 选项...
chainWebpack: config => {
config.module
.rule('swf')
.test(/\.swf$/)
.use('url-loader')
.loader('url-loader')
.tap(options => {
return {
limit: 10000
}
})
}
})