reset-admin

This commit is contained in:
xiaomlove
2021-04-21 19:54:50 +08:00
parent beb3a49bf2
commit 959db3cff2
139 changed files with 124 additions and 133052 deletions

40
admin/vite.config.js vendored
View File

@@ -1,43 +1,7 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vitePluginImport from 'vite-plugin-babel-import';
import path from 'path'
const baseUrl = {
development: './',
beta: './',
release: './'
}
// https://vitejs.dev/config/
export default ({ mode }) => defineConfig({
plugins: [
vue(),
vitePluginImport([
{
libraryName: 'element-plus',
libraryDirectory: 'es',
style(name) {
return `element-plus/lib/theme-chalk/${name}.css`;
},
}
])
],
base: baseUrl[mode],
resolve: {
alias: {
'~': path.resolve(__dirname, './'),
'@': path.resolve(__dirname, 'src')
}
},
server: {
proxy: {
'/api': {
target: 'http://backend-api-02.newbee.ltd/manage-api/v1',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '')
}
}
}
export default defineConfig({
plugins: [vue()]
})