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

feat(uvue): 非 web 端支持 uts 组件

上级 1b1ded83
......@@ -184,8 +184,12 @@ export function initUTSComponents(
): EasycomMatcher[] {
utsComponents.clear()
const components: EasycomMatcher[] = []
if (platform !== 'app' && platform !== 'app-plus') {
return components
const isApp = platform === 'app' || platform === 'app-plus'
// 目前仅 x 的非App平台支持
if (process.env.UNI_APP_X !== 'true') {
if (!isApp) {
return components
}
}
const easycomsObj: Record<
string,
......@@ -220,7 +224,7 @@ export function initUTSComponents(
is_uni_modules_utssdk ? path.dirname(dir) : dir
)
easycomsObj[`^${name}$`] = {
source: `${importDir}?uts-proxy`,
source: isApp ? `${importDir}?uts-proxy` : normalizePath(file),
kotlinPackage: parseKotlinPackageWithPluginId(
pluginId,
is_uni_modules_utssdk
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册