问题如下,参数只有 app | h5 | mp-alipay | mp-baidu | mp-kuaishou | mp-lark | mp-qq | mp-toutiao | mp-weixin | mp-xhs | mp-jd | mp-harmony | quickapp-webview | quickapp-webview-huawei | quickapp-webview-union
uni -h
uni/3.0.0-4080720251210001
Usage:
$ uni
Commands:
build
For more info, run any command with the --help flag:
$ uni --help
$ uni build --help
Options:
--host [host] [string] specify hostname
--port <port> [number] specify port
--https [boolean] use TLS + HTTP/2
--open [path] [boolean | string] open browser on startup
--cors [boolean] enable CORS
--strictPort [boolean] exit if specified port is already in use
--force [boolean] force the optimizer to ignore the cache and re-bundle
-c, --config <file> [string] use specified config file
-p, --platform [platform] [string] app | h5 | mp-alipay | mp-baidu | mp-kuaishou | mp-lark | mp-qq | mp-toutiao | mp-weixin | mp-xhs | mp-jd | mp-harmony | quickapp-webview | quickapp-webview-huawei | quickapp-webview-union (default: h5)
--base <path> [string] public base path (default: /)
-ssr [boolean] server-side rendering (default: false)
-l, --logLevel <level> [string] silent | error | warn | all
--clearScreen [boolean] allow/disable clear screen when logging
-d, --debug [feat] [string | boolean] show debug logs
-f, --filter <filter> [string] filter debug logs
-m, --mode <mode> [string] set env mode
--minify [minifier] [boolean | "terser" | "esbuild"] enable/disable minification, or specify minifier to use (default: terser)
--autoHost [autoHost] [string] specify automator hostname
--autoPort [autoPort] [number] specify automator port
--devtools [boolean] enable devtools
--devtoolsHost [devtoolsHost] [string] specify devtools hostname
--devtoolsPort [devtoolsPort] [number] specify devtools port
--subpackage [subpackage] [string] specify subpackage to build
--plugin [plugin] [string] specify plugin to build
-h, --help Display this message
-v, --version Display version number
1 个回复
Ask小助手 - Ask社区AI助手
根据您的问题和提供的知识库信息,uni-app的
-p参数目前没有app-harmony选项是设计使然。原因如下:uni-app中平台标识已明确区分:
app:专指传统iOS/Android App开发mp-harmony:专指鸿蒙元服务(HarmonyOS小程序)开发知识库文档明确说明:"需要特殊注意鸿蒙平台和App(安卓和ios)通常是分开并立的",且"鸿蒙平台上不支持app-plus相关功能"。
在manifest配置表中可见
app-harmony字段(链接),但这仅用于鸿蒙原生应用的高级配置,不是uni -p命令的有效参数选项。鸿蒙原生App开发需通过uni-app X的鸿蒙增强方案实现,而非传统
app平台参数。官方文档指出鸿蒙元服务使用mp-harmony标识(链接)。建议:若需开发鸿蒙原生应用,请使用uni-app X并参考鸿蒙开发文档,而非尝试添加
app-harmony参数。当前参数设计符合uni-app对多端平台的隔离策略。要回复问题请先登录或注册
公告
更多>相关问题