1 Star 0 Fork 11

Seul/vue3-store-admin

forked from jsfront/vue3-store-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
jikeytang 提交于 2021-06-28 09:50 . 增加request,增加api proxy
import type { UserConfig, ConfigEnv } from 'vite'
import { resolve } from 'path'
import vue from '@vitejs/plugin-vue'
import styleImport from 'vite-plugin-style-import'
// https://vitejs.dev/config/
export default ({ command, mode }: ConfigEnv): UserConfig => {
return {
// base: process.env.VITE_BASE_URL,
// base: '/vue3-store-admin',
resolve: {
alias: [
{
find: '@',
replacement: resolve(__dirname, './src'),
},
],
},
plugins: [
vue(),
styleImport({
libs: [
{
libraryName: 'ant-design-vue',
esModule: true,
resolveStyle: (name) => {
return `ant-design-vue/es/${name}/style/index`
},
},
],
}),
],
css: {
preprocessorOptions: {
scss: {
additionalData: `@import "@/styles/_variables.scss", "@/styles/_mixins.scss";`,
},
less: {
modifyVars: {},
javascriptEnabled: true,
},
},
},
server: {
port: 9527,
proxy: {
'/api': {
target: 'http://139.198.172.231:8490/',
changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, '/api/'),
},
},
},
}
}
// export default defineConfig({
// resolve: {
// alias: {
// '@': path.resolve(__dirname, 'src'),
// },
// },
// plugins: [vue()]
// })
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/seul-hy/vue3-store-admin.git
git@gitee.com:seul-hy/vue3-store-admin.git
seul-hy
vue3-store-admin
vue3-store-admin
master

搜索帮助