Skip to content

Publish Blazor WebAssembly as static files and folders #5217

Answered by ysmoradi
ParsaLmn asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there,

Thanks for reporting the issue.

We're currently using _Layout.cshtml and asp-append-version=true to make CSS and JS files http cache as efficient as possible, and also to make prerendering possible.

To address your issue, I recommend moving your existing API code to the project template's API project.
This is a simple API project that you can customize to your needs. By doing this, you can publish a single project.

Another option is to use your existing API's address in the src/Client/Core/appsettings.json file. This will require you to publish two projects, but you can reduce the size of the published output by removing unused NuGet packages, such as HealtCheck.

We do not curre…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ParsaLmn
Comment options

Answer selected by ParsaLmn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #5216 on September 02, 2023 10:09.