提交 d034ae8e 编写于 作者: 雪洛's avatar 雪洛

fix(harmony): 修复编译摇树导致UniError对象丢失的Bug

上级 27de594d
// TODO 使用@dcloudio进行引用
import {
UTSJSONObject,
UniError,
} from '../../../uni-uts-v1/lib/javascript/lib/runtime/uts.js'
import * as uni from './api/index'
import { UniServiceJSBridge } from './bridge'
import { registerApp as __registerApp, getApp } from './framework/app'
import { definePage as __definePage } from '@dcloudio/uni-app-plus/service/framework/page'
import { getCurrentPages } from '@dcloudio/uni-app-plus/service/framework/page'
export * from '@dcloudio/uni-runtime'
export default {
uni,
getApp,
......@@ -11,4 +17,6 @@ export default {
__definePage,
__registerApp,
UniServiceJSBridge,
UTSJSONObject,
UniError,
}
......@@ -114,6 +114,10 @@ export default defineConfig({
find: '@dcloudio/uni-platform',
replacement: resolve('./src/platform/index.ts'),
},
{
find: '@dcloudio/uni-uts-v1',
replacement: resolve('../uni-uts-v1'),
},
],
},
css: {
......
import '@dcloudio/uni-uts-v1/lib/javascript/lib/runtime/uts.js'
export {
isFunction,
isString,
......@@ -13,7 +12,3 @@ export { defineAsyncApi } from '@dcloudio/uni-api'
export { Emitter } from '@dcloudio/uni-shared'
export { getRealPath } from '@dcloudio/uni-platform'
export const __uniConfig = globalThis.__uniConfig
// @ts-expect-error TODO 处理类型冲突
export const UniError = globalThis.UniError
// @ts-expect-error TODO 处理类型冲突
export const UTSJSONObject = globalThis.UTSJSONObject
......@@ -656,3 +656,5 @@ const realGlobal = getGlobal();
realGlobal.UTSJSONObject = UTSJSONObject$1;
realGlobal.UniError = UniError;
realGlobal.UTS = UTS;
export { UTSJSONObject$1 as UTSJSONObject, UniError };
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册