移除传统的全局混入改为使用Vue3的全局暴露

This commit is contained in:
yuantao
2025-09-29 14:31:00 +08:00
parent 6f0bb2f949
commit ff550db7b6
6 changed files with 36 additions and 36 deletions

View File

@@ -31,7 +31,8 @@ function replaceManifestAppid() {
// 写回文件
writeFileSync(manifestPath, JSON.stringify(manifest, null, 4))
console.log(`Manifest appid 已更新为: ${appid}`)
console.log(`Manifest appid 已更新为: ${uni_appId}`)
console.log(`Manifest mp-weixin appid 已更新为: ${appid}`)
} else {
console.warn('未找到 VITE_APPID 和 VITE_UNI_APPID 环境变量,使用默认值')
}
@@ -41,7 +42,12 @@ function replaceManifestAppid() {
export default defineConfig({
plugins: [replaceManifestAppid(), uni()],
server: {
port: 3000,
build: {
minify: 'terser',
terserOptions: {
compress: {
drop_console: true,
},
},
},
})