-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement how to serve two windows #33
Comments
You can use the scheme option to create 2 different roots. const loadURLOne = serve({ directory: 'one', scheme: 'app' })
const loadURLTwo = serve({ directory: 'two', scheme: 'foo' }) |
It sort of works, but not being able to point to a file but to a folder, I get all my css lost. I would need to search them at a So I'll keep it only working at dev level (this is an app for me anyway), but it would be great that the (Thanks!) |
See if this works for you: https://github.com/mhkeller/electron-serve/tree/custom-route That's a branch that supports a There's also a branch called The |
It may be possible to close this now that custom HTML file names are supported via #36 |
Since version 1.3.0, this works for me as long as I set a different schema (my files are all in the same directory). |
@mhkeller do you have a working example? I tried to use the parameter
There is files in folder |
@epodivilov This is the example I put together using Sveltekit: https://github.com/mhkeller/sveltekit-electron/blob/serve/src/electron/index.js. Could be a file path issue? |
@mhkeller Thank you for your example. Yes, it seems that my problem is related to something else. I can't determine what it is yet. // Updated I found out that the problem was with dynamic partition assignment for different windows. Looks like partition in BrowserWindow should be the same as partition of serve function |
It is not possible (is it? I've been trying for a while now and have concluded it is not) to serve two different directories when the electron app has two windows.
Something like this
This in
dev
works as expected (the localhost is an astro site)But in
build
I can only get two windows opened that point to the same directory (the first one).So this would be a nice feature to have in mind, if it is feasible.
EDIT: Or a variant would be to point, instead of a directory, to a file
The text was updated successfully, but these errors were encountered: