feat: 组件切换动画过渡效果,查询ip转移到后端实现
This commit is contained in:
+3
-11
@@ -9,6 +9,9 @@ import { createHtmlPlugin } from 'vite-plugin-html'
|
||||
export default defineConfig(({command, mode}) => {
|
||||
let env = loadEnv(mode, process.cwd())
|
||||
return {
|
||||
define: {
|
||||
'process.env.NODE_ENV': JSON.stringify('production')
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
createSvgIconsPlugin({
|
||||
@@ -37,17 +40,6 @@ export default defineConfig(({command, mode}) => {
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/v1/ip': {
|
||||
target: 'https://searchplugin.csdn.net', //ip查询
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/v1\/ip/, '/api/v1/ip'),
|
||||
// bypass(req, res, options) {
|
||||
// console.log(1111)
|
||||
// const proxyUrl = new URL(options.rewrite(req.url) || '', (options.target) as string)?.href || ''
|
||||
// req.headers['x-req-proxyUrl'] = proxyUrl;
|
||||
// res.setHeader("x-res-proxyUrl", proxyUrl)
|
||||
// }
|
||||
},
|
||||
[env.VITE_APP_BASE_API] : {
|
||||
target: env.VITE_SERVE,
|
||||
changeOrigin: true,
|
||||
|
||||
Reference in New Issue
Block a user