dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Specifying the platform to `dx bundle` breaks the fullstack build

Open matous-volf opened this issue 11 months ago • 0 comments

Problem

Running

dx bundle

works fine. However, running

dx bundle --platform web

raises build errors regarding the client-only dependencies, e.g.

error[E0433]: failed to resolve: use of undeclared crate or module `dioxus_query`
 --> src/query/projects.rs:4:5
  |
4 | use dioxus_query::prelude::{use_get_query, QueryResult, UseQuery};
  |     ^^^^^^^^^^^^ use of undeclared crate or module `dioxus_query`

Steps To Reproduce

Steps to reproduce the behavior:

Expected behavior

If I understand correctly, the default feature in Cargo.toml is the one being built when no platform is specified to the dx bundle. The two commands above should then produce the same result, since the default feature is set to ["web"].

Environment:

  • Dioxus version: 0.6.1
  • Rust version: 1.83.0
  • OS info: the rust:1.83.0-bookworm Docker image
  • App platform: web (fullstack)

matous-volf avatar Jan 03 '25 20:01 matous-volf