4 Star 0 Fork 1

gkfInfo / kyplatform-education-admin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vite.config.js 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
gaokefankeyouinfo 提交于 2023-09-01 08:49 . 初始化
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import viteSvgIcons from 'vite-plugin-svg-icons';
import path from 'path';
const {resolve} = require('path');
// https://vitejs.dev/config/
export default defineConfig({
base: './',
plugins: [
vue(),
viteSvgIcons({
// 配置路劲在你的src里的svg存放文件
iconDirs: [path.resolve(process.cwd(), 'src/icons/svg')],
symbolId: 'icon-[name]'
})
],
resolve: {
alias: {
'@': resolve(__dirname, './src')
}
},
css: {
postcss: {
plugins: [
{
postcssPlugin: 'internal:charset-removal',
AtRule: {
charset: (atRule) => {
if (atRule.name === 'charset') {
atRule.remove();
}
}
}
}
]
}
},
server: {
port: 9528, // 服务端口
proxy: { // 代理
'/gateway': {
target: 'http://localhost:8180',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/gateway/, '')
}
}
}
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gkfInfo/kyplatform-education-admin.git
git@gitee.com:gkfInfo/kyplatform-education-admin.git
gkfInfo
kyplatform-education-admin
kyplatform-education-admin
master

搜索帮助

Bbcd6f05 5694891 0cc6727d 5694891