fix: 修复扫一扫登录
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 51s

This commit is contained in:
sexygoat
2026-04-17 11:18:46 +08:00
parent f72b77fe0d
commit 5f4a26e693
4 changed files with 33 additions and 63 deletions

View File

@@ -2,5 +2,26 @@ import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
export default defineConfig({
plugins: [uni()],
plugins: [
uni({
vueOptions: {
template: {
compilerOptions: {
// 保留微信 JSSDK 相关的全局变量
isCustomElement: (tag) => tag === 'wx'
}
}
}
})
],
build: {
rollupOptions: {
external: ['wx'],
output: {
globals: {
wx: 'wx'
}
}
}
}
})