feat: 添加环境配置文件,更新API基础地址
This commit is contained in:
@@ -1,19 +1,34 @@
|
||||
import { defineConfig } from '@rsbuild/core'
|
||||
import { pluginVue } from '@rsbuild/plugin-vue'
|
||||
import { pluginSass } from '@rsbuild/plugin-sass'
|
||||
const path = require('path')
|
||||
export default defineConfig({
|
||||
plugins: [pluginVue(), pluginSass()],
|
||||
html: {
|
||||
template: './index.html'
|
||||
},
|
||||
// 设置mode
|
||||
|
||||
source: {
|
||||
entry: {
|
||||
index: './src/main.ts'
|
||||
},
|
||||
define: {
|
||||
'process.env.VUE_APP_BASE_API': JSON.stringify(
|
||||
process.env.VUE_APP_BASE_API
|
||||
)
|
||||
},
|
||||
alias: {
|
||||
'@': './src'
|
||||
'@': path.resolve(__dirname, 'src')
|
||||
}
|
||||
},
|
||||
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': 'http://10.0.0.93:3000'
|
||||
}
|
||||
},
|
||||
|
||||
environments: {
|
||||
web: {
|
||||
source: {
|
||||
|
||||
Reference in New Issue
Block a user