import ICompileParam from '../../interface/ICompileParam'; import BuildNameFormatType from '../vela/enum/BuildNameFormatType'; interface IJavascriptCompileOption extends ICompileParam { devtool?: string | false; /** * 源码路径(相对项目根目录) */ sourceRoot: string; /** * 证书签名路径(相对项目根目录) */ signRoot: string; /** * 应用程序目录(相对项目根目录) */ releasePath: string; /** * 输出目录(相对项目根目录) */ outputPath: string; /** * 项目运行的代码覆盖率数据 */ dataCoverage: string; /** * 记录“连接过的设备信息”的文件地址 */ clientRecordPath: string; /** * 运行端口 */ server: { port: number; }; /** * 包名格式 */ buildNameFormat?: BuildNameFormatType; /** * 禁用 jsc */ enableJsc?: boolean; /** * 启用 protobuf */ enableProtobuf?: boolean; /** * 启用应用自动化测试 */ enableE2e?: boolean; /** * 启用 png8 压缩 */ enableImagePng8?: boolean; /** * 启用代码体积分析,会生成 report.html 文件,可查看打包后各模块占用体积 */ enableStats?: boolean; /** * 是否自动补全 manifest.json 中的 features 配置 */ completeFeature?: boolean; /** * 是否删除 console * * true:删除全部 console * string: 指定要去除的console,如'log'、'warn'、'error' * * @example true * * @example log,warn */ dropConsole?: boolean | string; /** * 启动页 */ startPage?: string; /** * 获取远程证书 */ signRequest?: () => Promise<{ /** * 证书私钥 */ privatekey: Buffer; /** * 证书 */ certificate: Buffer; }>; } export default IJavascriptCompileOption;