diff --git a/index.html b/index.html index 8388c4b..2943541 100644 --- a/index.html +++ b/index.html @@ -3,8 +3,9 @@ - - Vite + Vue + + + 摄影展
diff --git a/vite.config.js b/vite.config.js index e7f0954..71740f4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -7,6 +7,18 @@ import {VantResolver} from '@vant/auto-import-resolver'; import UnoCSS from 'unocss/vite' // https://vitejs.dev/config/ export default defineConfig({ + server: { + host: '0.0.0.0', // 监听所有网络接口 + port: 5878, + // 选项写法 + proxy: { + '/pag': { + target: 'https://cdn.tmui.design', + changeOrigin: true, + rewrite: (path) => path.replace(/^\/api/, '/api') + }, + } + }, plugins: [ vue(), UnoCSS(),