How to Serve Avalonia Browser WASM Without Any .NET/C# Dependency? #18378
Replies: 2 comments 1 reply
-
You should go through Yes, you can host the app on GitHub Pages (disable jekyll) or elsewhere as static content. You can look at other projects, like Ursa.Avalonia or Avalonia.Solitaire to see how they deploy. WASM is really for full webapps, not creating components for a traditional JS-based SPA. Though you can run several apps in one browser page with |
Beta Was this translation helpful? Give feedback.
-
Published app should include index.html. And it can be opened. It does include C# code compiled into WASM, but also it includes everything necessary to run it (assuming browser supports WASM). |
Beta Was this translation helpful? Give feedback.
-
Hi Avalonia team
I’m trying to serve an Avalonia Browser WASM app without any .NET or C# runtime dependency, just as static files. But I noticed that the wwwroot output doesn’t include an index.html.
Is there a way to generate an index.html during the build process, or do I need to manually copy it from wwwroot source code? Also, is there a way to host the app without using dotnet CLI? Our ultimate goal is to create corss plateform component that can be shared between all plateforms Avalonia has to offer. So we need to figure out how we can intergrate it as a component to use in browser native tranditional JavaScript applications.
Would appreciate any pointers on this! Thanks!
Beta Was this translation helpful? Give feedback.
All reactions