Skip to content

Conversation

@tekacs
Copy link
Contributor

@tekacs tekacs commented Oct 14, 2025

  • add optional application.static_dir field defaulting to none
  • copy configured static directory into web output during build/serve
  • document config knob and add unit tests
  • force full rebuild when static_dir contents change
  • sync removes stale outputs and logs copy activity
  • track static manifest next to platform dir

Tests: cargo fmt

- add optional application.static_dir field defaulting to none
- copy configured static directory into web output during build/serve
- document config knob and add unit tests
- force full rebuild when static_dir contents change
- sync removes stale outputs and logs copy activity
- track static manifest next to platform dir

Tests: cargo fmt
@tekacs tekacs requested a review from a team as a code owner October 14, 2025 03:01
@ealmloff ealmloff added enhancement New feature or request cli Related to the dioxus-cli program labels Oct 14, 2025
@tekacs
Copy link
Contributor Author

tekacs commented Oct 15, 2025

Haha I didn't default it to public just so that it wouldn't implicitly change people's setups, but making it public by default is nice. :)

@jkelleyrtp jkelleyrtp changed the title Add optional static_dir support Support public dir Oct 20, 2025
@jkelleyrtp
Copy link
Member

jkelleyrtp commented Oct 20, 2025

The asset system is already quite sophisticated so I changed this PR to just use that instead. Every file the public dir gets submitted into the asset system with hashing disabled. Our existing memoization system takes care of the rest.

I also adjusted things to merge the manifest together with the .cli-version fle we generate so we now have a .manifest.json file, similar to the one in ruby-on-rails.

Now, you can load that file and read its contents at runtime if you so choose. We'll add more to it eventually for deploy-related features.

NextJS supports a number of things like sitemap generation - we can probably re-use the public dir as a place to dump the output.

@jkelleyrtp jkelleyrtp merged commit b3966c3 into DioxusLabs:main Oct 20, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Related to the dioxus-cli program enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants