alibaba / alibaba/ice

[RFC] 多端产物 multi targets 能力

Open
#6,015 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

rfc
Dominant language
TypeScript
Stars
18.6k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

Summary | 概述

用于支持同时开发多端产物的能力

Motivation | 背景

目标:

  1. 支持同一个命令行构建多端产物
    1.1 build 模式下多进程并发构建
  2. 支持同一个 DevServer 提供多端产物的本地服务
Usage example | 使用示例

原有指定 target 的方式 (默认值是 "web")

icejs start --target=xxx

新的指定 target 的方式

  1. 通过 cli 指定
icejs start --target=xxx,yyy
  1. 在 ice.config.mts 中配置
{
  targets: ['xxx', 'yyy'],  // string[]
}
Detailed design | 方案设计

每一个构建上下文对应一个 Service
MultiService 同时管理多个 service 的相同接口
DevServer attach 到 MultiService 上

Additional context | 额外信息

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing icejs start --target handling and the ice.config.mts configuration described in the issue. Then read the Service, MultiService, and DevServer entry points to understand how build and local serving are currently coordinated. Done means one command or configuration can manage multiple targets for concurrent builds and a shared DevServer.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, cli, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.