mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
43 lines
892 B
Vue
Vendored
43 lines
892 B
Vue
Vendored
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/, '')
|
|
}
|
|
}
|
|
}
|
|
})
|