Files
device-voice-h5/vite.config.js
sexygoat 5f4a26e693
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 51s
fix: 修复扫一扫登录
2026-04-17 11:18:46 +08:00

28 lines
493 B
JavaScript

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