Browse Source

h5

master
HolyKnightIX 1 year ago
parent
commit
147929d4d6
3 changed files with 19 additions and 17 deletions
  1. +1
    -1
      src/main.js
  2. +4
    -0
      src/manifest.json
  3. +14
    -16
      vite.config.js

+ 1
- 1
src/main.js View File

@@ -1,6 +1,6 @@
// main.js
import uviewPlus from 'uview-plus'
import App from './App'
import "./style/my.scss";
//#region VUE3
import { createSSRApp } from 'vue'


+ 4
- 0
src/manifest.json View File

@@ -58,6 +58,10 @@
},
"usingComponents": true
},
"h5": {
"title": "",
"domain": ""
},
"mp-alipay": {
"usingComponents": true
},


+ 14
- 16
vite.config.js View File

@@ -1,25 +1,23 @@
import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'

// https://vitejs.dev/config/
export default defineConfig({
transpileDependencies: ['uview-ui'],
plugins: [
uni(),
],
// server: {
// host: "0.0.0.0",
// port: Number(env.VITE_APP_PORT),
// open: true, // 运行是否自动打开浏览器
// proxy: {
// // 反向代理解决跨域
// "/api": {
// target: env.VITE_APP_BASE_API, // 线上接口地址
// changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, ""),
// },
// },
// },
// build: {
// outDir: "build"
// }
server: {
host: "0.0.0.0",
port: '8591',
open: true, // 运行是否自动打开浏览器
proxy: {
// 反向代理解决跨域
"/api": {
target: 'https://test.metavatar.cc/C', // 线上接口地址
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
},
})

Loading…
Cancel
Save