1 Star 0 Fork 4

caoyong/门户网站

forked from AnxysUaen/门户网站 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vite.config.js 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
AnxysUaen 提交于 2023-04-10 20:33 . conf
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import { visualizer } from 'rollup-plugin-visualizer'
import Components from 'unplugin-vue-components/vite';
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
// import Icons from 'unplugin-icons/vite'
// import IconsResolver from 'unplugin-icons/resolver'
import AutoImport from 'unplugin-auto-import/vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
visualizer(),
AutoImport({
resolvers: [ ElementPlusResolver() ],
imports: ['vue']
}),
Components({
resolvers: [ ElementPlusResolver() ],
})
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
build: {
chunkSizeWarningLimit: 800,
rollupOptions: {
output: {
chunkFileNames: 'assets/js/[name]-[hash].js',
entryFileNames: 'assets/js/[name]-[hash].js',
assetFileNames: 'assets/static/[ext]/[name]-[hash].[ext]'
}
}
},
server: {
host: '0.0.0.0',
port: 8081,
proxy: {
'/api': {
target: 'http://10.10.10.27:7201',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/')
}
}
}
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/cao1yong/portal-site.git
git@gitee.com:cao1yong/portal-site.git
cao1yong
portal-site
门户网站
master

搜索帮助