mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
reset-admin
This commit is contained in:
40
admin/vite.config.js
vendored
40
admin/vite.config.js
vendored
@@ -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()]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user