修复日程提醒功能
This commit is contained in:
+15
-28
@@ -1,29 +1,16 @@
|
||||
import { defineConfig, loadEnv } from 'vite'
|
||||
import uni from '@dcloudio/vite-plugin-uni'
|
||||
import { defineConfig } from 'vite'
|
||||
import uni from '@dcloudio/vite-plugin-uni'
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), '')
|
||||
const apiTarget = (env.VITE_API_BASE_URL || 'http://localhost:9000').replace(/\/$/, '')
|
||||
|
||||
return {
|
||||
plugins: [uni()],
|
||||
server: {
|
||||
proxy: {
|
||||
// 勿用 /api:会与 uniapp/api/ 源码目录冲突,导致 request.js 等模块 404
|
||||
'/proxy-api': {
|
||||
target: apiTarget,
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/proxy-api/, '')
|
||||
}
|
||||
}
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
// 关闭废弃 API 警告
|
||||
silenceDeprecations: ['legacy-js-api', 'color-functions', 'import']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
uni()
|
||||
],
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
// 关闭废弃 API 警告
|
||||
silenceDeprecations: ['legacy-js-api', 'color-functions', 'import'],
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user