feat: 完成字典模块改造,前端完成首页界面
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import { defineConfig, loadEnv } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
@@ -8,7 +8,9 @@ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||
|
||||
var CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
/** @type {import('vite').UserConfig} */
|
||||
export default defineConfig({
|
||||
export default defineConfig(({ command, mode })=>{
|
||||
const env = loadEnv(mode, process.cwd(), '')
|
||||
return {
|
||||
// envDir: 'env',
|
||||
plugins: [
|
||||
vue(),
|
||||
@@ -28,12 +30,16 @@ export default defineConfig({
|
||||
port:18001,
|
||||
open:true,
|
||||
proxy:{
|
||||
'/api': {
|
||||
target: 'http://localhost:19001',
|
||||
|
||||
[env.VITE_APP_BASEAPI]: {
|
||||
target: env.VITE_APP_URL,
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
rewrite: (path) => path.replace(/^\/api-dev/, ''),
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user