Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support target and renderer #5700

Merged
merged 12 commits into from
Jan 6, 2023
Merged

Conversation

wssgcg1213
Copy link
Collaborator

@wssgcg1213 wssgcg1213 commented Dec 12, 2022

  1. 增加了 import.meta.target 用以标识构建时的目标,支持 web 为默认构建目标,并支持分包构建
    1.1 统一术语,修改命令行参数 --platform 为 --target, 同时兼容 --platform 写法
  2. 增加了 import.meta.renderer 用以标识运行时目标,在 CSR 模式下为 client,在 SSG 和 SSR 模式下使用 server
  3. 增加了 import.meta.env 对象,包括 process.env 下的 NODE_ENV, ICE_ 开头的变量, 以及用户在 .env 系列文件中自定义的变量

@wssgcg1213 wssgcg1213 requested review from ClarkXia, luhc228 and answershuto and removed request for ClarkXia December 12, 2022 08:36
@wssgcg1213 wssgcg1213 changed the title feat: support target and renderMode feat: support target and renderer Dec 12, 2022
packages/ice/src/commands/build.ts Outdated Show resolved Hide resolved
packages/webpack-config/src/index.ts Outdated Show resolved Hide resolved
@ClarkXia ClarkXia mentioned this pull request Dec 14, 2022
8 tasks
@wssgcg1213 wssgcg1213 requested a review from luhc228 December 14, 2022 07:41
@wssgcg1213 wssgcg1213 force-pushed the feat/target-and-render-mode branch from 956926b to b7825e6 Compare December 14, 2022 08:57
@wssgcg1213 wssgcg1213 force-pushed the feat/target-and-render-mode branch from fe733df to 3e7acb6 Compare December 14, 2022 09:03
@ClarkXia ClarkXia mentioned this pull request Dec 16, 2022
10 tasks
examples/multi-target/src/app.tsx Outdated Show resolved Hide resolved
packages/ice/src/createService.ts Show resolved Hide resolved
tests/integration/multi-target.test.ts Outdated Show resolved Hide resolved
@wssgcg1213 wssgcg1213 requested a review from ClarkXia January 6, 2023 02:52
@wssgcg1213 wssgcg1213 merged commit f46d0e7 into release/3.0 Jan 6, 2023
@wssgcg1213 wssgcg1213 deleted the feat/target-and-render-mode branch January 6, 2023 07:07
@ClarkXia ClarkXia mentioned this pull request Jan 11, 2023
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants