ASCF(Atomic Service Cross Framework)是元服务为小程序生态定制的一套解决方案,能够使用类似于小程序的开发技术,高效开发元服务。其提供了系统级的运行时能力,开发阶段编译调试的工具链。同时提供了转换工具将已有的小程序项目快速转换为ASCF框架的元服务项目。
可按照下面步骤排查问题:
{
"root": "scopeComponent",
"pages": [],
"common": true
} import { appTasks } from '@ohos/hvigor-ohos-plugin';
import ascfPlugin, { signByBuildModePlugin } from '@atomicservice/ascf-toolkit-hvigor-plugin';
export default {
system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins: [
ascfPlugin({ skipAscfCompile: true }),
signByBuildModePlugin('default', 'release')
]
} hdc shell bm dump-shared -a hdc shell bm dump-shared -n com.huawei.hms.ascfruntime
Q:工程为分模块的Taro工程,只转换了单独模块的Taro工程,转换ASCF后运行,显示白屏也看不到报错信息。
A:1.升级ASCF的运行时以及Toolkit版本,具体方法请参考升级已有项目的ASCF运行时版本以及升级已有项目的ASCF Toolkit版本。2.在ascf/ascf_src/ascf.config.json配置文件中添加以下编译配置:"templateHoist": true,其他编译配置请参考ASCF的项目json配置。
{
"swc": true,
"miniprogramRoot": "./",
"templateHoist": true // 添加该行配置
}