2 Star 0 Fork 2

openGauss/quick-issue-website

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.ts 2.14 KB
一键复制 编辑 原始数据 按行查看 历史
王木口 提交于 2023-08-28 15:40 . fix:切换测试环境
import { defineConfig } from 'vite';
import path from 'path';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import Icons from 'unplugin-icons/vite';
import { FileSystemIconLoader } from 'unplugin-icons/loaders';
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
import ElementPlus from 'unplugin-element-plus/vite';
export default defineConfig({
base: process.env.NODE_ENV === 'development' ? './' : '/',
resolve: {
alias: {
'@/': `${path.resolve(__dirname, './src')}/`,
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
},
},
plugins: [
vue(),
vueJsx({}),
AutoImport({
resolvers: [ElementPlusResolver({ importStyle: 'sass' })],
}),
Components({
resolvers: [ElementPlusResolver({ importStyle: 'sass' })],
}),
Icons({
compiler: 'vue3',
customCollections: {
app: FileSystemIconLoader('./src/assets/svg-icons'),
},
}),
ElementPlus({
useSource: true,
}),
],
css: {
preprocessorOptions: {
scss: {
additionalData: `@use "@/shared/styles/element-plus/index.scss" as *;`,
},
},
},
build: {
chunkSizeWarningLimit: 1500,
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('node_modules')) {
return id
.toString()
.split('node_modules/')[1]
.split('/')[0]
.toString();
}
},
},
},
},
server: {
proxy: {
'/api-dsapi/': {
target: 'https://dsapi.osinfra.cn/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api-dsapi/, ''),
},
'/api-omapi/': {
target: 'https://omapi.osinfra.cn/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api-omapi/, ''),
},
'/api-issues/': {
target: 'https://quickissue-ipb-opengauss.test.osinfra.cn',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api-issues/, ''),
},
},
},
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opengauss/quick-issue-website.git
git@gitee.com:opengauss/quick-issue-website.git
opengauss
quick-issue-website
quick-issue-website
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385