unoplatform / Uno.Wasm.Bootstrap

A simple nuget package to run C# code in a WASM-compatible browser
Other
367 stars 57 forks source link

[WASM] Bug in 'service-worker.js' when using the 'WasmPWAManifestFile' option in project file #784

Closed DierkDroth closed 10 months ago

DierkDroth commented 11 months ago

I'm trying to make my UNO WASM app a proper PWA and added the WasmPWAManifestFileoption to my project file. This appears to create a ./service-worker.js file -> good.

However, there is a bug in ./service-worker.js when importing uno-config.js by this line:

import { config } from "/app/wasm/Latest/package_ad1491e5a8b56662fc53c8e8bb7a424a4d067fbb//uno-config.js";

Note the double slashes ...//uno-config.js which apparently throws off my AWS S3 file hosting, since the browsers returns a 404 error.

TopProgrammer77 commented 10 months ago

@DierkDroth Why do you use '//' instead of '/'?

DierkDroth commented 10 months ago

@TopProgrammer77 to be clear: I'm not doing anything AFAIK. That code line is generated by UNO

DierkDroth commented 10 months ago

Thanks for merging @jeromelaban. I'll try the fix as a build is available