jsakamoto / BlazorWasmPreRendering.Build

When you publish your Blazor Wasm app, this package pre-renders and saves the app as static HTML files in your public folder.
https://jsakamoto.github.io/BlazorWasmPreRendering.Build/
Mozilla Public License 2.0
252 stars 14 forks source link

After .NET 8 update appsettings.json.br not found after publishing to github pages #41

Closed fingers10 closed 9 months ago

fingers10 commented 10 months ago

Hi @jsakamoto ,

I have updated my project to .NET 8 and published main branch of https://github.com/ILoveDotNet/ilovedotnet to github pages. I have noticed an runtime error which says appsettings.json.br is not found. The error is coming from brotliloader.min.js. This issue does not happen when publishing to IIS but happens when published to github pages.

Since the issue happened in production. I have reverted the .NET 8 upgrade. Howerver here is the .NET 8 commit link in main branch for your reference- https://github.com/ILoveDotNet/ilovedotnet/commit/58b42ecb8f49a0b090574a0150a0f5edd5df55d5

I remember we have already faced brotli issue in the past. Here is the previous issue reference - https://github.com/jsakamoto/BlazorWasmPreRendering.Build/issues/22#issuecomment-1302276022

image

Please can you assist me on this? Feel free to let me know if any additional details are needed.

fingers10 commented 10 months ago

Hi @jsakamoto any hints on this?

jsakamoto commented 9 months ago

Hi @fingers10,

I figured out that it is not a problem with the "BlazorWasmPreRendering.Build" package. It is a problem with the"PublishSPAforGitHubPages.Build" package. I fixed the problem that loading configurations fail on .NET 8 and published a new version of the "PublishSPAforGitHubPages.Build" package.

https://www.nuget.org/packages/PublishSPAforGitHubPages.Build/2.1.1#releasenotes-body-tab

I hope that the new package resolves the issue you reported here. Please try it out.

fingers10 commented 9 months ago

Many thanks @jsakamoto . That solved the issue.