[Question] Can Tauri bundle existing websites into desktop apps? #4734
-
Not that relevant, and maybe i should've used another way of asking questions rather than gh's issues, but given some context... Well, an application on npm, called nativefier, is able to make websites into desktop applications using Electron. Since Tauri kinda does something similar to Electron, but using different libraries to get better performance and binary sizes, can Tauri bundle existing websites that way? (Note: not a js guy, didn't read nor understood the whole nativefier's source code, even though it seems to be pretty straightforward, so idk whether or not that part of bundling is a special magic done on nativefier's implementation itself but yeah) Just curiosity, not something urgent whatsoever. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
You'd probably HTTP request intercepting for this to work. I don't think Tauri implements that yet. |
Beta Was this translation helpful? Give feedback.
-
Generally yes, but there was no work done to streamline use-cases like this (especially since we completely consider browser(-like) use-cases out of scope for now), so expect rough edges here and there (or missing features, i'm not too familiar with nativefier) |
Beta Was this translation helpful? Give feedback.
-
FWIW - I just tried Tauri with a static archived web using HTML pages, standard linked JS files and href linked pages (relative paths) and it worked fine. Just used npm create tauri-app and specified new app name, used the dist folder as the server root and did vanilla JS (no framework) then dropped all the web pages with images folder, etc into the dist folder and then did a build. Ended up with a working DMG and app worked well. Built it on 12.5.1 as a x64 binary and ran it on 10.13 OK. If I was looking at bundling a static site from the web I might use something like SiteSucker to obtain the web pages/JS/CSS/images etc and then just drop them into the dist folder. |
Beta Was this translation helpful? Give feedback.
-
A simple way to do this, is to set |
Beta Was this translation helpful? Give feedback.
-
Check this: https://github.com/hamza72x/web2app |
Beta Was this translation helpful? Give feedback.
You'd probably HTTP request intercepting for this to work. I don't think Tauri implements that yet.