You've already forked template-MP-ts
移除传统的全局混入改为使用Vue3的全局暴露
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user