Open emerabet opened 1 year ago
Hi @emerabet try adding this SPA redirect rule via the console. Make sure to add the missing file extensions to the regex. https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html#redirects-for-single-page-web-apps-spa
ex. </^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|woff2|ttf|map|json|webp|gz|br)$)([^.]+$)/>
Here is more specific documentation for your use case: https://swimburger.net/blog/dotnet/how-to-deploy-blazor-webassembly-to-aws-amplify#rewrite-all-requests-to-indexhtml
Hi @hloriana I tried to add the rewrite rule you suggested but with no success. the browser keeps loading the .dll files instead of the .gz generated during the build
Thanks!
Before opening, please confirm:
App Id
d3drcnfa1b1cqc
Region
eu-west-1
Amplify Hosting feature
Performance
Describe the bug
Hello,
I'm trying to host a blazor wasm project using amplify connected to github. I followed this guide https://aws.amazon.com/fr/blogs/devops/deploy-net-blazor-webassembly-application-to-aws-amplify/ The gzip files and brotli files are well generated by the build command
dotnet publish -c Release -o release
but when deployed by Amplify only .js and .css are served with content-enconding to gzip.Expected behavior
All gzip files should be served
Reproduction steps
or
Open this url with network tab active: https://main.d3drcnfa1b1cqc.amplifyapp.com
Build Settings
Additional information
Thanks for your help