mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 03:27:43 +01:00
Previously, View extensions loaded their HTML files directly from disk. Now, Coco starts a lightweight local HTTP server to serve the static files, and the extension loads them via HTTP instead. This refactoring is needed because Tauri is not allowed to load local files directly, we have to call convertFileSrc() to do the URL conversion to make it work. In previous implementations, we did such conversions to all the paths specified in the HTML file, but we realized that there are paths in JS/CSS files as well, and it is impossible to convert them all. So we have to change the way how view extensions load their files.