You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In multi-target fullstack setups like the template with fullstack enabled the Cargo.toml must have features for each platform like this:
[features]
desktop = ["dioxus/desktop"]
web = ["dioxus/web"]
mobile = ["dioxus/mobile"]
server = ["dioxus/server"]
During a web build, two binaries are built: the server with the server feature enabled and the client with the web feature enabled.
web should not be a default feature flag because that would enable the web feature during the server build. That could cause issues with user code with web-only logic gated behind that flag.
Implement Suggestion
The CLI could read from a default_platform config with either web, desktop, or mobile to determine what platform to serve if --platform argument is set
Restore the default_platform setting that was removed in #2975
The text was updated successfully, but these errors were encountered:
There is some interaction here with the default features and rust analyzer. Whatever features we have enabled by default are used by default by rust analyzer. It sounds like the intention in #2975 was to enable a feature by default for rust analyzer. We could enable all features by default for rust analyzer and disable default features in the CLI when we serve, but it makes it more difficult to reason about what features are enabled when you build:
[features]
default = ["desktop", "web", "mobile", "server"]
desktop = ["dioxus/desktop"]
web = ["dioxus/web"]
mobile = ["dioxus/mobile"]
server = ["dioxus/server"]
Feature Request
In multi-target fullstack setups like the template with fullstack enabled the
Cargo.toml
must have features for each platform like this:During a
web
build, two binaries are built: the server with theserver
feature enabled and the client with theweb
feature enabled.web
should not be a default feature flag because that would enable theweb
feature during the server build. That could cause issues with user code with web-only logic gated behind that flag.Implement Suggestion
The CLI could read from a
default_platform
config with either web, desktop, or mobile to determine what platform to serve if--platform
argument is setRestore the
default_platform
setting that was removed in #2975The text was updated successfully, but these errors were encountered: