πŸ–₯
Separate Desktop Logic from Web App Logic
We recommend adding all of your custom javascript into a separate file and importing it when your app is being run as a desktop app. Here's how to do this:
1
<script type="module">
2
if (window.todesktop) {
3
import('some-module.mjs');
4
}
5
</script>
Copied!
Because your desktop app will always be running a very recent version of Chromium, you can rely on the latest browser features being present when your app is running as a desktop app.
​
Last modified 2yr ago
Copy link