提交 78731284 编写于 作者: fxy060608's avatar fxy060608

fix(x-ios): 调整日志输出,直接替换为uni.__log__,避免 __f__ 的初始化时机问题

上级 cdaf4c4c
......@@ -17,7 +17,7 @@ import * as uniCliShared from '@dcloudio/uni-cli-shared'
export function init() {
return [
uniHBuilderXConsolePlugin(),
uniHBuilderXConsolePlugin('uni.__log__'),
uniUTSUniModulesPlugin({
x: true,
isSingleThread: process.env.UNI_APP_X_SINGLE_THREAD !== 'false',
......
......@@ -20,10 +20,6 @@ export function uniAppIOSMainPlugin(): Plugin {
import './${PAGES_JSON_UTS}'
const __global__ = typeof globalThis === 'undefined' ? Function('return this')() : globalThis
__global__.__uniX = true
__global__.__f__ = (type,filename: string,...args) => {
uni.__log__(type, filename, ...args)
// console[type].apply(console, [...args, filename])
}
${code}
createApp().app.mount("#app");
`,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册