diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-checks.yml index 818d33e47da..5c3833a5835 100644 --- a/.github/workflows/main-checks.yml +++ b/.github/workflows/main-checks.yml @@ -25,7 +25,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: clippy - args: --all-targets -- -D warnings + args: --all-targets --all-features -- -D warnings - name: Lint feature soundness run: | @@ -51,12 +51,11 @@ jobs: - uses: Swatinem/rust-cache@v1 - - name: Run clippy uses: actions-rs/cargo@v1 with: command: clippy - args: --all-targets --release -- -D warnings + args: --all-targets --all-features --release -- -D warnings - name: Lint feature soundness run: | @@ -108,7 +107,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --doc --workspace --exclude yew --exclude changelog --exclude website-test --target wasm32-unknown-unknown + args: --doc --workspace --exclude yew --exclude changelog --exclude website-test --exclude ssr_router --exclude simple_ssr --target wasm32-unknown-unknown - name: Run website code snippet tests uses: actions-rs/cargo@v1 @@ -196,7 +195,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --all-targets --workspace --exclude yew --exclude website-test + args: --all-targets --workspace --exclude yew --exclude website-test --exclude ssr_router --exclude simple_ssr - name: Run native tests for yew uses: actions-rs/cargo@v1 diff --git a/examples/simple_ssr/Cargo.toml b/examples/simple_ssr/Cargo.toml index a9559e37335..0e1fc0aad6d 100644 --- a/examples/simple_ssr/Cargo.toml +++ b/examples/simple_ssr/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -yew = { path = "../../packages/yew", features = ["ssr", "hydration"] } +yew = { path = "../../packages/yew" } reqwest = { version = "0.11.8", features = ["json"] } serde = { version = "1.0.132", features = ["derive"] } uuid = { version = "1.0.0", features = ["serde"] } @@ -23,3 +23,7 @@ num_cpus = "1.13" tokio-util = { version = "0.7", features = ["rt"] } once_cell = "1.5" clap = { version = "3.1.7", features = ["derive"] } + +[features] +hydration = ["yew/hydration"] +ssr = ["yew/ssr", "yew/tokio"] diff --git a/examples/simple_ssr/README.md b/examples/simple_ssr/README.md index 6c02a63edf3..41105b934dd 100644 --- a/examples/simple_ssr/README.md +++ b/examples/simple_ssr/README.md @@ -10,7 +10,7 @@ This example demonstrates server-side rendering. 2. Run the server -`cargo run --bin simple_ssr_server -- --dir examples/simple_ssr/dist` +`cargo run --features=ssr --bin simple_ssr_server -- --dir examples/simple_ssr/dist` 3. Open Browser diff --git a/examples/simple_ssr/index.html b/examples/simple_ssr/index.html index 62951cf4073..2cb77d4d490 100644 --- a/examples/simple_ssr/index.html +++ b/examples/simple_ssr/index.html @@ -4,6 +4,6 @@