rsnext/packages/next-swc/crates/next-dev/Cargo.toml
Tobias Koppers eab61f3c65 add basic next pages support (vercel/turbo#223)
Server Rendering:

* This adds an additional ContentSource to next-dev which takes care of handling the `pages` directory.
* The content source creates a ServerRenderedAsset from each file in the `src/pages` or `pages` directory and a AssetGraphContentSource for that.
* The ServerRenderedAsset will reference an underlying asset for the node.js context which will be passed to the node executable for rendering. It uses a WrapperAsset to add additional communication logic.

Client Transition:

* When annotating `import`s with `transition: "next-client"` the NextClientTransition is used
* This transition changes the environment to browser
* It wraps the referenced asset with a next-hyrdation wrapper asset
* It leaves a little module in the previous context which exports a list of URLs for chunks needed.
* The NextClientTransition takes a client_chunking_context as argument which specifies how the client code is chunked.
2022-08-15 17:26:37 +00:00

52 lines
1.4 KiB
TOML

[package]
name = "next-dev"
version = "0.1.0"
edition = "2021"
[[bin]]
name = "next-dev"
path = "src/main.rs"
bench = false
[lib]
bench = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
tokio_console = [
"dep:console-subscriber",
"tokio/tracing",
"turbo-tasks/tokio_tracing",
]
[dependencies]
anyhow = "1.0.47"
clap = { version = "3.1.3", features = ["derive"] }
console-subscriber = { version = "0.1.6", optional = true }
futures = "0.3.21"
json = "0.12.4"
mime = "0.3.16"
next-core = { path = "../next-core" }
serde = "1.0.136"
tokio = { version = "1.11.0", features = ["full"] }
turbo-tasks = { path = "../turbo-tasks" }
turbo-tasks-fs = { path = "../turbo-tasks-fs" }
turbo-tasks-memory = { path = "../turbo-tasks-memory" }
turbopack = { path = "../turbopack" }
turbopack-cli-utils = { path = "../turbopack-cli-utils" }
turbopack-core = { path = "../turbopack-core" }
turbopack-dev-server = { path = "../turbopack-dev-server" }
webbrowser = "0.7.1"
[dev-dependencies]
tungstenite = "0.17.3" # For matching on errors from chromiumoxide. Keep in
# sync with chromiumoxide's tungstenite requirement.
chromiumoxide = { version = "0.3.5", features = [
"tokio-runtime",
], default-features = false }
lazy_static = "1.4.0"
test-generator = "0.3.0"
[build-dependencies]
turbo-tasks-build = { path = "../turbo-tasks-build" }