-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
WEB-1253: turbopack-cli: implement turbopack build
#5488
Conversation
This work prepares for `turbopack build` by extracting code common between dev and build, such as asset context. This also makes the cli accept a variadic list of entries rather than an unnamed directory parameter. The project directory is now available under `--dir` or `-d`. Test Plan: `cargo run -p turbopack-cli dev` with a `src/index.js` present and `cargo run -p turbopack-cli dev src/entry.js` with `src/entry.js` present.
Depends on #5487 This implements a basic version of `turbopack build`, only targeting browser targets. In the future, we could accept a cli or configuration option to target Node. Test Plan: `cargo run -p turbopack-cli build` with a `src/index.js` present and `cargo run -p turbopack-cli build src/entry.js` with `src/entry.js` present.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
9 Ignored Deployments
|
Logs
See job summary for details |
|
… wbinnssmith/turbopack-cli-build
…i' into wbinnssmith/turbopack-cli-build
…rize-cli' into wbinnssmith/turbopack-cli-build
Linux Benchmark for 042dee2Click to view benchmark
|
})) | ||
.into(); | ||
|
||
handle_issues(build_result, issue_reporter, &None, &None).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we fail the build process if there are issues?
for chunk_group in entry_chunk_groups { | ||
for entry in &*chunk_group.await? { | ||
for asset in &*all_assets_from_entry(entry.to_owned()).await? { | ||
asset.content().write(asset.ident().path()).await?; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's pretty inefficient since it's generating and writing all assets sequentially. You could generate and write them all in parallel.
Linux Benchmark for ac46a9cClick to view benchmark
|
…rbopack-cli-build
Linux Benchmark for 7da4e02Click to view benchmark
|
MacOS Benchmark for 7da4e02
Click to view full benchmark
|
* vercel/turborepo#5567 <!-- Alex Kirszenberg - Remove unnecessary ValueDebugFormat item, hide Vc field --> * vercel/turborepo#5576 <!-- Alex Kirszenberg - Extract shared HMR utils to their own modules/crates --> * vercel/turborepo#5503 <!-- OJ Kwon - feat(turbopack_core): define trait for diagnostics --> * vercel/turborepo#5487 <!-- Will Binns-Smith - turbopack-cli: modularize code to support turbopack build --> * vercel/turborepo#5488 <!-- Will Binns-Smith - turbopack-cli: implement `turbopack build` --> * vercel/turborepo#5450 <!-- Leah - feat: async modules / top level await --> --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
turbopack build
turbopack build
Depends on vercel/turborepo#5487 This implements a basic version of `turbopack build`, only targeting browser targets. In the future, we could accept a cli or configuration option to target Node. Test Plan: `cargo run -p turbopack-cli build` with a `src/index.js` present and `cargo run -p turbopack-cli build src/entry.js` with `src/entry.js` present.
Depends on vercel/turborepo#5487 This implements a basic version of `turbopack build`, only targeting browser targets. In the future, we could accept a cli or configuration option to target Node. Test Plan: `cargo run -p turbopack-cli build` with a `src/index.js` present and `cargo run -p turbopack-cli build src/entry.js` with `src/entry.js` present.
Depends on vercel/turborepo#5487 This implements a basic version of `turbopack build`, only targeting browser targets. In the future, we could accept a cli or configuration option to target Node. Test Plan: `cargo run -p turbopack-cli build` with a `src/index.js` present and `cargo run -p turbopack-cli build src/entry.js` with `src/entry.js` present.
Depends on #5487
This implements a basic version of
turbopack build
, only targeting browser targets. In the future, we could accept a cli or configuration option to target Node.Test Plan:
cargo run -p turbopack-cli build
with asrc/index.js
present andcargo run -p turbopack-cli build src/entry.js
withsrc/entry.js
present.